summaryrefslogtreecommitdiff
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-04 13:18:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-04 13:18:51 +0100
commit5348d7b605c0188852e6729c6dbc22afae590a73 (patch)
treea90b73eb3c5602b667373b9806f2532b2cc5ac32 /libavcodec/aacdec.c
parentfd242b468d666a89a06af3bd2bd38144ce5df8dd (diff)
parentedd9ea3ffba1d5873dead1c57c74b1e3cc912167 (diff)
Merge commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167'
* commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167': aacdec: Refactor aac_er_decode_frame. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index e8fa6c939d..249066d058 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2852,11 +2852,12 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, GetBitContext *gb)
{
AACContext *ac = avctx->priv_data;
+ const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac;
ChannelElement *che;
int err, i;
int samples = 1024;
- int chan_config = ac->oc[1].m4ac.chan_config;
- int aot = ac->oc[1].m4ac.object_type;
+ int chan_config = m4ac->chan_config;
+ int aot = m4ac->object_type;
if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD)
samples >>= 1;
@@ -2868,13 +2869,13 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data,
// 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->avctx->profile = aot - 1;
ac->tags_mapped = 0;
if (chan_config < 0 || chan_config >= 8) {
avpriv_request_sample(avctx, "Unknown ER channel configuration %d",
- ac->oc[1].m4ac.chan_config);
+ chan_config);
return AVERROR_INVALIDDATA;
}
for (i = 0; i < tags_per_config[chan_config]; i++) {