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>2012-06-03 23:53:22 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-06-05 15:26:34 +0400
commitaba8065adb63f1b00bcef7762534d1c41cb870bb (patch)
tree81da919fec6e7a0a807bf3491163754c09a58dcf /libavfilter/avfiltergraph.c
parent6a4c5c730ed67a7f472e43205fd96e91781796ce (diff)
avfiltergraph: call query_formats on inputs first.
This is a temporary workaround for amerge, until format renegociation is implemented. Should fix trac ticket #1400.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 997ae451f9..1ab98798ec 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -235,8 +235,14 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
AVFilterFormats *samplerates;
int scaler_count = 0, resampler_count = 0;
+ for (j = 0; j < 2; j++) {
/* ask all the sub-filters for their supported media formats */
for (i = 0; i < graph->filter_count; i++) {
+ /* Call query_formats on sources first.
+ This is a temporary workaround for amerge,
+ until format renegociation is implemented. */
+ if (!graph->filters[i]->input_count == j)
+ continue;
if (graph->filters[i]->filter->query_formats)
ret = graph->filters[i]->filter->query_formats(graph->filters[i]);
else
@@ -244,6 +250,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
if (ret < 0)
return ret;
}
+ }
/* go through and merge as many format lists as possible */
for (i = 0; i < graph->filter_count; i++) {