diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-06-08 18:07:14 +0200 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2018-09-28 08:28:16 -0700 |
commit | 3dd382275553f6c234e9ec758312d0ac6ef76dc1 (patch) | |
tree | 3f535a0910a1e8bf36832a1bf7a5665c6c5f932b /libAACdec/src | |
parent | ad1c598166057bd6cc14448ccb8de5026b1e7f5c (diff) | |
download | fdk-aac-3dd382275553f6c234e9ec758312d0ac6ef76dc1.tar.gz fdk-aac-3dd382275553f6c234e9ec758312d0ac6ef76dc1.tar.bz2 fdk-aac-3dd382275553f6c234e9ec758312d0ac6ef76dc1.zip |
Always check whether given channel config is supported.
Bug: 112660981
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I169161dd31bc624f2cab6be2b4c6518946ed32ba
Diffstat (limited to 'libAACdec/src')
-rw-r--r-- | libAACdec/src/aacdecoder.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp index 2f43fc0..fab30de 100644 --- a/libAACdec/src/aacdecoder.cpp +++ b/libAACdec/src/aacdecoder.cpp @@ -1630,18 +1630,10 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc, aacChannelsOffset = 0; aacChannelsOffsetIdx = 0; elementOffset = 0; - if ((ascChannels <= 0) || + if ((ascChannels <= 0) || (ascChannels > (8)) || (asc->m_channelConfiguration > AACDEC_MAX_CH_CONF)) { return AAC_DEC_UNSUPPORTED_CHANNELCONFIG; } - if ((ascChannels + aacChannelsOffsetIdx) > ((8) * 2)) { - return AAC_DEC_UNSUPPORTED_CHANNELCONFIG; - } - if (configMode & AC_CM_ALLOC_MEM) { - if ((ascChannels + aacChannelsOffset) > (8)) { - return AAC_DEC_UNSUPPORTED_CHANNELCONFIG; - } - } /* Set syntax flags */ self->flags[streamIndex] = 0; |