From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 4 Feb 2023 21:46:15 +0100 Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch to new channel layout API Fixes #10168 Signed-off-by: Paul B Mahol --- libavfilter/af_pan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index 067f646805..504e0fb5d3 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -313,6 +313,7 @@ static int config_props(AVFilterLink *link) pan->channel_map[i] = ch_id; } + av_opt_set_chlayout(pan->swr, "ichl", &pan->out_channel_layout, 0); av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0); swr_set_channel_mapping(pan->swr, pan->channel_map); } else { @@ -333,6 +334,8 @@ static int config_props(AVFilterLink *link) for (j = 0; j < link->ch_layout.nb_channels; j++) pan->gain[i][j] /= t; } + av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); + av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0); swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]); } -- 2.39.1