aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-04-20 14:01:57 -0700
committerAlex Converse <alex.converse@gmail.com>2012-04-20 14:06:28 -0700
commit7eacd70feac49656d70fce677f4d7b42279338da (patch)
treee5c0ff32f9adb3f1bec7a057343291034b34c647 /libavcodec/aacdec.c
parentdc878b96a78c1cc5edc6edc0bf087cf7a3c14ae9 (diff)
downloadffmpeg-7eacd70feac49656d70fce677f4d7b42279338da.tar.gz
aac: Handle HE-AACv2 when sniffing a channel order.
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 7cf21954c9..bd5ba00373 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -404,6 +404,13 @@ static int output_configure(AACContext *ac,
if (ret < 0)
return ret;
}
+ if (ac->oc[1].m4ac.ps == 1 && channels == 2) {
+ if (layout == AV_CH_FRONT_CENTER) {
+ layout = AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT;
+ } else {
+ layout = 0;
+ }
+ }
memcpy(ac->tag_che_map, ac->che, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
avctx->channel_layout = ac->oc[1].channel_layout = layout;