Commit 34bf06a3 authored by Stefano Sabatini's avatar Stefano Sabatini

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.
parent 06fc74bd
......@@ -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 "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment