Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-05-06 15:46:23 +0400
committerNicolas George <nicolas.george@normalesup.org>2013-05-07 20:40:51 +0400
commit78d16b6a51095cde231524dd394ac200b7bddde9 (patch)
treeea1660722f9e800aff03a6fb89e9045ccef2ba04 /libavfilter/avfiltergraph.c
parent449704b47500bbd3530c584e50a5d76f02d90113 (diff)
lavfi: fix filter format negotiation loop.
query_formats() returning EAGAIN is not considered a progress in the format negotiation. If the filter returns EAGAIN but did set some of its formats lists, it could be considered a partial success and counted as progress in the negotiation. Not counting it is not a problem because it currently only happens in the first round, where there will always be some progress on the other filters.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 582a87023d..860f1d892b 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -333,7 +333,8 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
ret = ff_default_query_formats(f);
if (ret < 0 && ret != AVERROR(EAGAIN))
return ret;
- count_queried++;
+ /* note: EAGAIN could indicate a partial success, not counted yet */
+ count_queried += ret >= 0;
}
/* go through and merge as many format lists as possible */