Fixes #10168
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -313,7 +313,9 @@ static int config_props(AVFilterLink *link) · 312 unmodified lines | ||
| 313 | 313 | pan->channel_map[i] = ch_id; |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | − av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0); | |
| 316 | + av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); | |
| 317 | + av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0); | |
| 318 | + av_opt_set_int(pan->swr, "uch", link->ch_layout.nb_channels, 0); | |
| 317 | 319 | swr_set_channel_mapping(pan->swr, pan->channel_map); |
| 318 | 320 | } else { |
| 319 | 321 | // renormalize |
| @@ -333,6 +335,8 @@ static int config_props(AVFilterLink *link) · 13 unmodified lines | ||
| 333 | 335 | for (j = 0; j < link->ch_layout.nb_channels; j++) |
| 334 | 336 | pan->gain[i][j] /= t; |
| 335 | 337 | } |
| 338 | + av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); | |
| 339 | + av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0); | |
| 336 | 340 | swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]); |
| 337 | 341 | } |
| 338 | 342 | |