summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorAndrew Wason <rectalogic@rectalogic.com>2012-06-05 11:02:43 -0400
committerMichael Niedermayer <michaelni@gmx.at>2012-06-05 18:15:29 +0200
commitc527027c27d58e1f885e3a2649477bed89f830f6 (patch)
treeb9d8d09b691fca82212b8620e234301dacd3756c /libavfilter/formats.c
parent787c395a30ecc87bd6dadf2ec1ccab8648653880 (diff)
aconvert filter needs to configure samplerates
I changed the *_set_common_* functions to only set unset formats, then added a wrapper that calls them after the filters query_formats. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 9e15024237..1fd95eb174 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -405,13 +405,13 @@ void avfilter_formats_changeref(AVFilterFormats **oldref,
int count = 0, i; \
\
for (i = 0; i < ctx->input_count; i++) { \
- if (ctx->inputs[i]) { \
+ if (ctx->inputs[i] && !ctx->inputs[i]->out_fmts) { \
ref(fmts, &ctx->inputs[i]->out_fmts); \
count++; \
} \
} \
for (i = 0; i < ctx->output_count; i++) { \
- if (ctx->outputs[i]) { \
+ if (ctx->outputs[i] && !ctx->outputs[i]->in_fmts) { \
ref(fmts, &ctx->outputs[i]->in_fmts); \
count++; \
} \