aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2020-04-09 17:58:17 +0200
committerRay Essick <essick@google.com>2021-02-14 12:21:04 -0800
commit87e01ef1e77105adda58a2a89e2179d43327266c (patch)
treef36762fd7dbf8d59f9d6772da6474ecbd2f63b4c /libAACdec/src
parente916be37f24a118eb0663b53794389dc83af8e8d (diff)
downloadfdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.tar.gz
fdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.tar.bz2
fdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.zip
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
Diffstat (limited to 'libAACdec/src')
-rw-r--r--libAACdec/src/aacdecoder_lib.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp
index f5ce7e0..47e7496 100644
--- a/libAACdec/src/aacdecoder_lib.cpp
+++ b/libAACdec/src/aacdecoder_lib.cpp
@@ -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: