You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfiltergraph: check the query_formats() return value
This commit is contained in:
@@ -271,9 +271,15 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
/* ask all the sub-filters for their supported media formats */
|
/* ask all the sub-filters for their supported media formats */
|
||||||
for (i = 0; i < graph->nb_filters; i++) {
|
for (i = 0; i < graph->nb_filters; i++) {
|
||||||
if (graph->filters[i]->filter->query_formats)
|
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
|
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 */
|
/* go through and merge as many format lists as possible */
|
||||||
|
Reference in New Issue
Block a user