From 9ab67882eca7454dc001e158bc1e6e2219d6650b Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 4 May 2018 15:51:23 +0200 Subject: FDKv2 additional fixes Bug: 71430241 Bug: 79220129 Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestXheAac cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestAacDrc Add restriction to call intensity stereo tool only for applicable configurations Change-Id: I30ec6640bd484c56cc9d5b8b35186fc1c875e021 Fix high band energy calculation in sbr encoder Change-Id: I964dd46fab2ed797c440a983512bbab7e1aff98a Fix out-of-bounds read access in noiseless coder Change-Id: I9a669435dbdca421ff9e4affec57811002d75b3b Use temporary buffer for dummy parsing to check presence of audioPreroll data Change-Id: I2d42c5c8deddde34351c3d2858b9fe196b3a0906 Set applyAsc to 1 in case that the ASC parsing fails Change-Id: I552a8b960270bc18cae459ad28a3ba241035668e Parametric stereo together with mps not supported Change-Id: Icde14a2774a4303bb0c41046861a59d04b624365 Align ssc callback error path for drm Change-Id: Ie8ecbfa42c702e6df81c1aec532a9ff1e653dac9 Ensure that the bit counter starts at a multiple of TPDEC_SYNCSKIP Change-Id: I08d69ec361b2e2ed800282e333fd248b4b3ca245 Allow flushing only when audioPreroll is enabled in current and new config Change-Id: I52e95d75de4bbed692be922a59a23bda58870625 Omit reverse channel mapping in pass through mode Change-Id: I335e209c29a700cc091be069f1d08e4288b40793 --- libSACdec/src/sac_dec_lib.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libSACdec/src') diff --git a/libSACdec/src/sac_dec_lib.cpp b/libSACdec/src/sac_dec_lib.cpp index 56d8693..ebf9bee 100644 --- a/libSACdec/src/sac_dec_lib.cpp +++ b/libSACdec/src/sac_dec_lib.cpp @@ -698,6 +698,7 @@ SACDEC_ERROR mpegSurroundDecoder_Config( INT coreSbrFrameLengthIndex, INT configBytes, const UCHAR configMode, UCHAR *configChanged) { SACDEC_ERROR err = MPS_OK; + SPATIAL_SPECIFIC_CONFIG spatialSpecificConfig; switch (coreCodec) { case AOT_DRM_USAC: @@ -705,7 +706,6 @@ SACDEC_ERROR mpegSurroundDecoder_Config( if (configMode == AC_CM_DET_CFG_CHANGE) { /* In config detection mode write spatial specific config parameters * into temporarily allocated structure */ - SPATIAL_SPECIFIC_CONFIG spatialSpecificConfig; err = SpatialDecParseMps212Config( hBs, &spatialSpecificConfig, samplingRate, coreCodec, stereoConfigIndex, coreSbrFrameLengthIndex); @@ -718,9 +718,16 @@ SACDEC_ERROR mpegSurroundDecoder_Config( break; case AOT_ER_AAC_ELD: case AOT_ER_AAC_LD: - err = SpatialDecParseSpecificConfig( - hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup, configBytes, - coreCodec); + if (configMode == AC_CM_DET_CFG_CHANGE) { + /* In config detection mode write spatial specific config parameters + * into temporarily allocated structure */ + err = SpatialDecParseSpecificConfig(hBs, &spatialSpecificConfig, + configBytes, coreCodec); + } else { + err = SpatialDecParseSpecificConfig( + hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup, + configBytes, coreCodec); + } break; default: err = MPS_UNSUPPORTED_FORMAT; -- cgit v1.2.3