aac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE
authornu774 <honeycomb77@gmail.com>
Wed, 3 Jun 2015 05:01:32 +0000 (14:01 +0900)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 3 Jun 2015 12:40:10 +0000 (14:40 +0200)
commit0289f81241e720452b5a77713488d54d3ec252d7
treeeeb0a879794cc7a670d3566bc3b1811a0e1f1cd8
parent7f596368a404363d72b1be6d16c51420a71bc523
aac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE

The decoder assigns channels using default channel configuration
for 5.1ch when it parses an ADTS frame header using consecutive
channel ids.

When a PCE comes, it reassigns channels using PCE configuration
using directly the ids provided. They can be arbitrary.

Always use consecutive channel ids to avoid decoding glitches due
spurious reconfigurations due the channel ids mismatch between the
two otherwise-identical channel maps.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/aacdec.c