aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-20 13:54:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-20 13:54:54 +0200
commit8daf04add46a2bcdb10fc05a865a159059757711 (patch)
tree6107aea8cb42f240cf00b0fe64d55a8b827c14ae /libavcodec
parentd0492578c805cfd41673aa2cdadf52efde40e307 (diff)
downloadffmpeg-8daf04add46a2bcdb10fc05a865a159059757711.tar.gz
aacdec: support chan config =1 stereo files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacdec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 684c845521..64f89723f0 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2137,6 +2137,15 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
elem_id = get_bits(gb, 4);
if (elem_type < TYPE_DSE) {
+ if (!ac->tags_mapped && elem_type == TYPE_CPE && ac->m4ac.chan_config==1) {
+ enum ChannelPosition new_che_pos[4][MAX_ELEM_ID]= {0};
+ ac->m4ac.chan_config=2;
+
+ if (set_default_channel_config(ac->avctx, new_che_pos, 2)<0)
+ return -1;
+ if (output_configure(ac, ac->che_pos, new_che_pos, 2, OC_TRIAL_FRAME)<0)
+ return -1;
+ }
if (!(che=get_che(ac, elem_type, elem_id))) {
av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
elem_type, elem_id);