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.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -277,6 +277,8 @@ int avfilter_config_links(AVFilterContext *filter) · 276 unmodified lines | ||
| 277 | 277 | link->sample_rate = inlink->sample_rate; |
| 278 | 278 | if (!link->time_base.num && !link->time_base.den) |
| 279 | 279 | link->time_base = inlink->time_base; |
| 280 | + if (!link->channel_layout) | |
| 281 | + link->channel_layout = inlink->channel_layout; | |
| 280 | 282 | } else if (!link->sample_rate) { |
| 281 | 283 | av_log(link->src, AV_LOG_ERROR, |
| 282 | 284 | "Audio source filters must set their output link's " |