[FFmpeg-cvslog] avfiltergraph: check the query_formats() return value
Anton Khirnov
git at videolan.org
Sun Jun 26 14:40:40 CEST 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun May 22 10:46:19 2016 +0200| [ac84e618df4765ba751327497994066d0931e6a8] | committer: Anton Khirnov
avfiltergraph: check the query_formats() return value
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac84e618df4765ba751327497994066d0931e6a8
---
libavfilter/avfiltergraph.c | 10 ++++++++--
1 file 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 */
More information about the ffmpeg-cvslog
mailing list