Format selection can fail if unknown channel layouts are used with filters that do not support it.
Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all
Unified · Split
| @@ -654,6 +654,10 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) · 653 unmodified lines | |||
| 654 | av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for" | 654 | av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for" |
| 655 | " the link between filters %s and %s.\n", link->src->name, | 655 | " the link between filters %s and %s.\n", link->src->name, |
| 656 | link->dst->name); | 656 | link->dst->name); |
| 657 | if (!link->in_channel_layouts->all_counts) | ||
| 658 | av_log(link->src, AV_LOG_ERROR, "Unknown channel layouts not " | ||
| 659 | "supported, try specifying a channel layout using " | ||
| 660 | "'aformat=channel_layouts=something'.\n"); | ||
| 657 | return AVERROR(EINVAL); | 661 | return AVERROR(EINVAL); |
| 658 | } | 662 | } |
| 659 | link->in_channel_layouts->nb_channel_layouts = 1; | 663 | link->in_channel_layouts->nb_channel_layouts = 1; |