This reverts commit 93a9ee7afd7bf2e019490117f1bada30724a0200. Was not fixing real problem, issue is probably outside of pan filter.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -313,9 +313,7 @@ static int config_props(AVFilterLink *link) · 312 unmodified lines | |||
| 313 | pan->channel_map[i] = ch_id; | 313 | pan->channel_map[i] = ch_id; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); | 316 | av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 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); | ||
| 319 | swr_set_channel_mapping(pan->swr, pan->channel_map); | 317 | swr_set_channel_mapping(pan->swr, pan->channel_map); |
| 320 | } else { | 318 | } else { |
| 321 | // renormalize | 319 | // renormalize |
| @@ -335,8 +333,6 @@ static int config_props(AVFilterLink *link) · 13 unmodified lines | |||
| 335 | for (j = 0; j < link->ch_layout.nb_channels; j++) | 333 | for (j = 0; j < link->ch_layout.nb_channels; j++) |
| 336 | pan->gain[i][j] /= t; | 334 | pan->gain[i][j] /= t; |
| 337 | } | 335 | } |
| 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); | ||
| 340 | swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]); | 336 | swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]); |
| 341 | } | 337 | } |
| 342 | 338 | ||