Copy DCP name layout fix from master.
[dcpomatic.git] / src / lib / filter_graph.cc
index 2d8f83aa73da6d8b03c46005b5c45ff3780da6f7..9f80118bd468be8f6df388d7931b3f501af13e27 100644 (file)
@@ -124,9 +124,6 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, dcp::Size s,
        if (avfilter_graph_config (graph, 0) < 0) {
                throw DecodeError (N_("could not configure filter graph."));
        }
-
-       avfilter_inout_free (&inputs);
-       avfilter_inout_free (&outputs);
 }
 
 FilterGraph::~FilterGraph ()
@@ -147,8 +144,9 @@ FilterGraph::process (AVFrame* frame)
        if (_copy) {
                images.push_back (make_pair (shared_ptr<Image> (new Image (frame)), av_frame_get_best_effort_timestamp (frame)));
        } else {
-               if (av_buffersrc_write_frame (_buffer_src_context, frame) < 0) {
-                       throw DecodeError (N_("could not push buffer into filter chain."));
+               int r = av_buffersrc_write_frame (_buffer_src_context, frame);
+               if (r < 0) {
+                       throw DecodeError (String::compose (N_("could not push buffer into filter chain (%1)."), r));
                }
                
                while (true) {