[FFmpeg-cvslog] avfiltergraph: check query_formats return value.

Nicolas George git at videolan.org
Tue Jun 5 13:44:02 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sun Jun  3 21:48:59 2012 +0200| [6a4c5c730ed67a7f472e43205fd96e91781796ce] | committer: Nicolas George

avfiltergraph: check query_formats return value.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a4c5c730ed67a7f472e43205fd96e91781796ce
---

 libavfilter/avfiltergraph.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index da5015c..997ae45 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -238,9 +238,11 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
     /* ask all the sub-filters for their supported media formats */
     for (i = 0; i < graph->filter_count; i++) {
         if (graph->filters[i]->filter->query_formats)
-            graph->filters[i]->filter->query_formats(graph->filters[i]);
+            ret = graph->filters[i]->filter->query_formats(graph->filters[i]);
         else
-            ff_default_query_formats(graph->filters[i]);
+            ret = ff_default_query_formats(graph->filters[i]);
+        if (ret < 0)
+            return ret;
     }
 
     /* go through and merge as many format lists as possible */



More information about the ffmpeg-cvslog mailing list