diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-05-22 10:46:19 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-05-23 06:46:18 +0200 |
commit | ac84e618df4765ba751327497994066d0931e6a8 (patch) | |
tree | 218cd5dce1fc3510fd11efae01da71278d2272ca /libavfilter | |
parent | 2ef6dab0a79a9852a92ed80b07f9e32a37530d9e (diff) | |
download | ffmpeg-streaming-ac84e618df4765ba751327497994066d0931e6a8.zip ffmpeg-streaming-ac84e618df4765ba751327497994066d0931e6a8.tar.gz |
avfiltergraph: check the query_formats() return value
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 6832664..5053e3c 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -271,9 +271,15 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) /* ask all the sub-filters for their supported media formats */ for (i = 0; i < graph->nb_filters; 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) { + av_log(log_ctx, AV_LOG_ERROR, + "Error querying formats for the filter %s (%s)\n", + graph->filters[i]->name, graph->filters[i]->filter->name); + return ret; + } } /* go through and merge as many format lists as possible */ |