mirror of https://github.com/mstorsjo/fdk-aac.git
Always check whether given channel config is supported.
Bug: 112660981 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I169161dd31bc624f2cab6be2b4c6518946ed32ba Merged-In: I169161dd31bc624f2cab6be2b4c6518946ed32ba
This commit is contained in:
parent
42f714f2ab
commit
25b209f229
|
@ -1630,18 +1630,10 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc,
|
|||
aacChannelsOffset = 0;
|
||||
aacChannelsOffsetIdx = 0;
|
||||
elementOffset = 0;
|
||||
if (configMode & AC_CM_ALLOC_MEM) {
|
||||
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 ((ascChannels + aacChannelsOffset) > (8)) {
|
||||
return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set syntax flags */
|
||||
self->flags[streamIndex] = 0;
|
||||
|
|
Loading…
Reference in New Issue