diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-10-01 17:14:22 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-10-01 17:14:22 -0700 |
commit | 13846446b76a9a82b1d04ec6cde963bdc5a15bb1 (patch) | |
tree | d325be97ad610123f2246697bfe92b15d9c0b768 /libAACdec/src | |
parent | 40214e149687863168e6bf08f99f0cfdeff5cc17 (diff) | |
parent | 4a6124d2312e13b0c3d1e513ad483d9f201d0f6b (diff) | |
download | fdk-aac-13846446b76a9a82b1d04ec6cde963bdc5a15bb1.tar.gz fdk-aac-13846446b76a9a82b1d04ec6cde963bdc5a15bb1.tar.bz2 fdk-aac-13846446b76a9a82b1d04ec6cde963bdc5a15bb1.zip |
Merge "Unify audio element loop abort criterion in ER syntax" into pi-dev am: 28234107a7
am: 4a6124d231
Change-Id: I12aa62bfe5cc0c2900e6eb0e5427dba5f8a40068
Diffstat (limited to 'libAACdec/src')
-rw-r--r-- | libAACdec/src/aacdecoder.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp index fab30de..24907ee 100644 --- a/libAACdec/src/aacdecoder.cpp +++ b/libAACdec/src/aacdecoder.cpp @@ -2047,17 +2047,12 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc, if (self->flags[streamIndex] & (AC_RSV603DA | AC_USAC)) { _numElements = (int)asc->m_sc.m_usacConfig.m_usacNumElements; } - if (self->flags[streamIndex] & (AC_ER | AC_LD | AC_ELD)) { - _numElements = (asc->m_channelConfiguration == 7) - ? 8 - : asc->m_channelConfiguration; - } for (int _el = 0; _el < _numElements; _el++) { int el_channels = 0; int el = elementOffset + _el; if (self->flags[streamIndex] & - (AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) { + (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) { if (ch >= ascChannels) { break; } @@ -2107,7 +2102,9 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc, (SPECTRAL_PTR)&self->workBufferCore2[ch * 1024]; if (el_channels == 2) { - FDK_ASSERT(ch < (8) - 1); + if (ch >= (8) - 1) { + return AAC_DEC_UNSUPPORTED_CHANNELCONFIG; + } self->pAacDecoderChannelInfo[ch + 1]->pComData = self->pAacDecoderChannelInfo[ch]->pComData; self->pAacDecoderChannelInfo[ch + 1]->pComStaticData = |