mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
alsdec: change channel sorting so it match reference implementation
Read channel source instead of channel target for channel sorting. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
0140566359
commit
d4211c4722
@ -356,12 +356,15 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
for (i = 0; i < avctx->channels; i++) {
|
||||
sconf->chan_pos[i] = get_bits(&gb, chan_pos_bits);
|
||||
if (sconf->chan_pos[i] >= avctx->channels) {
|
||||
int idx;
|
||||
|
||||
idx = get_bits(&gb, chan_pos_bits);
|
||||
if (idx >= avctx->channels) {
|
||||
av_log(avctx, AV_LOG_WARNING, "Invalid channel reordering.\n");
|
||||
sconf->chan_sort = 0;
|
||||
break;
|
||||
}
|
||||
sconf->chan_pos[idx] = i;
|
||||
}
|
||||
|
||||
align_get_bits(&gb);
|
||||
|
Loading…
Reference in New Issue
Block a user