diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 11:50:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 11:51:13 +0100 |
commit | 405ceb181236b0c7b4558dbefac8869c93df5965 (patch) | |
tree | b68e99e62e1f4541969706b56e281aa94f15e1b4 /libavcodec/aacdec.c | |
parent | ab71be091206a2264f3a8862215fc284bb8e6274 (diff) | |
parent | 454959a5aa73b585e2937b948178310c74bfc297 (diff) | |
download | ffmpeg-405ceb181236b0c7b4558dbefac8869c93df5965.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
aacdec: Set the profile during decoding
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index bb613f009a..0e1551c23f 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2263,10 +2263,12 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt, } else if (ac->oc[1].m4ac.ps == -1 && ac->oc[1].status < OC_LOCKED && ac->avctx->channels == 1) { ac->oc[1].m4ac.sbr = 1; ac->oc[1].m4ac.ps = 1; + ac->avctx->profile = FF_PROFILE_AAC_HE_V2; output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, ac->oc[1].status, 1); } else { ac->oc[1].m4ac.sbr = 1; + ac->avctx->profile = FF_PROFILE_AAC_HE; } res = ff_decode_sbr_extension(ac, &che->sbr, gb, crc_flag, cnt, elem_type); break; @@ -2801,6 +2803,10 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data, if ((err = frame_configure_elements(avctx)) < 0) return err; + // The FF_PROFILE_AAC_* defines are all object_type - 1 + // This may lead to an undefined profile being signaled + ac->avctx->profile = ac->oc[1].m4ac.object_type - 1; + ac->tags_mapped = 0; if (chan_config < 0 || chan_config >= 8) { @@ -2870,6 +2876,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, if ((err = frame_configure_elements(avctx)) < 0) goto fail; + // The FF_PROFILE_AAC_* defines are all object_type - 1 + // This may lead to an undefined profile being signaled + ac->avctx->profile = ac->oc[1].m4ac.object_type - 1; + ac->tags_mapped = 0; // parse while ((elem_type = get_bits(gb, 3)) != TYPE_END) { |