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

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_pan.c+5−1
@@ -313,7 +313,9 @@ 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_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 swr_set_channel_mapping(pan->swr, pan->channel_map);319 swr_set_channel_mapping(pan->swr, pan->channel_map);
318 } else {320 } else {
319 // renormalize321 // renormalize
@@ -333,6 +335,8 @@ static int config_props(AVFilterLink *link) · 13 unmodified lines
333 for (j = 0; j < link->ch_layout.nb_channels; j++)335 for (j = 0; j < link->ch_layout.nb_channels; j++)
334 pan->gain[i][j] /= t;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 swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);340 swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);
337 }341 }
338 342

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