1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-06-05 22:39:13 +02:00

Check number of core channels and SAC decoder input channels to avoid a channel mismatch.

Bug: 176246647
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: Ib8b6973e9c29e13b8ef33d7736be2b977928face
This commit is contained in:
Fraunhofer IIS FDK
2020-04-09 17:58:17 +02:00
committed by Jean-Michel Trivi
parent d6a7375bfa
commit 5eb9ed1b1f
9 changed files with 51 additions and 32 deletions

View File

@ -385,21 +385,19 @@ static INT aacDecoder_SbrCallback(
return errTp;
}
static INT aacDecoder_SscCallback(void *handle, HANDLE_FDK_BITSTREAM hBs,
const AUDIO_OBJECT_TYPE coreCodec,
const INT samplingRate, const INT frameSize,
const INT stereoConfigIndex,
const INT coreSbrFrameLengthIndex,
const INT configBytes, const UCHAR configMode,
UCHAR *configChanged) {
static INT aacDecoder_SscCallback(
void *handle, HANDLE_FDK_BITSTREAM hBs, const AUDIO_OBJECT_TYPE coreCodec,
const INT samplingRate, const INT frameSize, const INT numChannels,
const INT stereoConfigIndex, const INT coreSbrFrameLengthIndex,
const INT configBytes, const UCHAR configMode, UCHAR *configChanged) {
SACDEC_ERROR err;
TRANSPORTDEC_ERROR errTp;
HANDLE_AACDECODER hAacDecoder = (HANDLE_AACDECODER)handle;
err = mpegSurroundDecoder_Config(
(CMpegSurroundDecoder *)hAacDecoder->pMpegSurroundDecoder, hBs, coreCodec,
samplingRate, frameSize, stereoConfigIndex, coreSbrFrameLengthIndex,
configBytes, configMode, configChanged);
samplingRate, frameSize, numChannels, stereoConfigIndex,
coreSbrFrameLengthIndex, configBytes, configMode, configChanged);
switch (err) {
case MPS_UNSUPPORTED_CONFIG: