X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilter_graph.cc;h=48d94e17570c2c6306ba975574c42a1e66f64e7f;hb=09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a;hp=a3bb0093edb1e7a84896d8286b04840962f246d4;hpb=09fcffa01669ee9f146c6c0e86be0f26b6dcd165;p=dcpomatic.git diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc index a3bb0093e..48d94e175 100644 --- a/src/lib/filter_graph.cc +++ b/src/lib/filter_graph.cc @@ -33,6 +33,7 @@ extern "C" { #include "filter.h" #include "exceptions.h" #include "image.h" +#include "ffmpeg_content.h" #include "i18n.h" @@ -44,14 +45,14 @@ using std::make_pair; using std::cout; using boost::shared_ptr; using boost::weak_ptr; -using libdcp::Size; +using dcp::Size; /** Construct a FilterGraph for the settings in a piece of content. * @param content Content. * @param s Size of the images to process. * @param p Pixel format of the images to process. */ -FilterGraph::FilterGraph (shared_ptr content, libdcp::Size s, AVPixelFormat p) +FilterGraph::FilterGraph (shared_ptr content, dcp::Size s, AVPixelFormat p) : _buffer_src_context (0) , _buffer_sink_context (0) , _size (s) @@ -121,7 +122,8 @@ FilterGraph::FilterGraph (shared_ptr content, libdcp::Size throw DecodeError (N_("could not configure filter graph.")); } - /* XXX: leaking `inputs' / `outputs' ? */ + avfilter_inout_free (&inputs); + avfilter_inout_free (&outputs); } FilterGraph::~FilterGraph () @@ -158,7 +160,7 @@ FilterGraph::process (AVFrame* frame) * @return true if this chain can process images with `s' and `p', otherwise false. */ bool -FilterGraph::can_process (libdcp::Size s, AVPixelFormat p) const +FilterGraph::can_process (dcp::Size s, AVPixelFormat p) const { return (_size == s && _pixel_format == p); }