summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-08-31 23:55:11 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-09-02 10:42:25 +0200
commit34bf06a35c169d0ebb681802cf7168bf4d4eecdf (patch)
tree93cd43061988610ea0ad89868c7784acc487c7c9 /libavfilter
parent06fc74bda0989473294adf63e9eef3ea913ce236 (diff)
lavfi: when configuring a link, set channel layout from previous link if unspecified
In avfilter_config_links(), if the current channel layout is not specified, set the same value of the previous link in the filterchain. Consistent with the logic used to set the other link parameters.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index d05d4eaf01..3bac29d5ac 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -277,6 +277,8 @@ int avfilter_config_links(AVFilterContext *filter)
link->sample_rate = inlink->sample_rate;
if (!link->time_base.num && !link->time_base.den)
link->time_base = inlink->time_base;
+ if (!link->channel_layout)
+ link->channel_layout = inlink->channel_layout;
} else if (!link->sample_rate) {
av_log(link->src, AV_LOG_ERROR,
"Audio source filters must set their output link's "