avfilter/af_channelmap: do not override set channel layout

This commit is contained in:
Paul B Mahol 2023-11-24 19:34:00 +01:00
parent bbdedd9663
commit 37c5bcc4e8

View File

@ -230,7 +230,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
s->nch = map_entries;
if (out_ch_mask)
av_channel_layout_from_mask(&s->output_layout, out_ch_mask);
else if (map_entries)
else if (map_entries && s->output_layout.nb_channels == 0)
av_channel_layout_default(&s->output_layout, map_entries);
if (mode == MAP_NONE) {