aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libAACdec/src/aacdecoder.cpp10
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;