avfilter: Properly check for failed format query
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Thu, 2 Oct 2014 10:55:52 +0000 (11:55 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Thu, 2 Oct 2014 11:22:49 +0000 (12:22 +0100)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavfilter/avfiltergraph.c

index 9178939..a859ecb 100644 (file)
@@ -559,7 +559,9 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
                 if ((ret = avfilter_insert_filter(link, convert, 0, 0)) < 0)
                     return ret;
 
                 if ((ret = avfilter_insert_filter(link, convert, 0, 0)) < 0)
                     return ret;
 
-                filter_query_formats(convert);
+                if ((ret = filter_query_formats(convert)) < 0)
+                    return ret;
+
                 inlink  = convert->inputs[0];
                 outlink = convert->outputs[0];
                 av_assert0( inlink-> in_formats->refcount > 0);
                 inlink  = convert->inputs[0];
                 outlink = convert->outputs[0];
                 av_assert0( inlink-> in_formats->refcount > 0);