History

avfilter/af_pan: fix regression introduced with switch to new channel layout API

Fixes #10168

Paul B Mahol committed 3 years ago

Commit 93a9ee71 parent df4ab691 file · +5 −1Browse files

Unified · Split

libavfilter/af_pan.c+5−1
@@ -313,7 +313,9 @@ static int config_props(AVFilterLink *link) · 312 unmodified lines
313313 pan->channel_map[i] = ch_id;
314314 }
315315
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);
317319 swr_set_channel_mapping(pan->swr, pan->channel_map);
318320 } else {
319321 // renormalize
@@ -333,6 +335,8 @@ static int config_props(AVFilterLink *link) · 13 unmodified lines
333335 for (j = 0; j < link->ch_layout.nb_channels; j++)
334336 pan->gain[i][j] /= t;
335337 }
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);
336340 swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);
337341 }
338342

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t