aboutsummaryrefslogtreecommitdiffstats
path: root/libSACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-05-04 17:41:40 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-04 17:41:40 -0700
commitb2ce5c82bd4288b0e55d23f8cbf1d51150d752fc (patch)
tree8bf6f33f28355cd7dd6c4f5a01c5324a43ec66bc /libSACdec/src
parent2ef3dc81e5bfa012a5b1b7fce573fdd1b73130e8 (diff)
parent259a3c5bd5eb9be666f40dfb2978502533dd2b82 (diff)
downloadfdk-aac-b2ce5c82bd4288b0e55d23f8cbf1d51150d752fc.tar.gz
fdk-aac-b2ce5c82bd4288b0e55d23f8cbf1d51150d752fc.tar.bz2
fdk-aac-b2ce5c82bd4288b0e55d23f8cbf1d51150d752fc.zip
FDKv2 additional fixes am: 9ab67882ec
am: 259a3c5bd5 Change-Id: Iac5c03364819ea0ef7a91cccfc0b62af0b19b612
Diffstat (limited to 'libSACdec/src')
-rw-r--r--libSACdec/src/sac_dec_lib.cpp15
1 files changed, 11 insertions, 4 deletions
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;