aboutsummaryrefslogtreecommitdiffstats
path: root/libSACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-12-20 15:52:46 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2018-12-28 20:00:08 -0500
commit80fa8b8067dc7e92f8d70cf0a2fe7c7c65555409 (patch)
tree23119deece54255ff25a8f1db6c124cf65fe9083 /libSACdec/src
parentb9f1b6dec01dab90aed33974603f188c7f6b1b5d (diff)
downloadfdk-aac-80fa8b8067dc7e92f8d70cf0a2fe7c7c65555409.tar.gz
fdk-aac-80fa8b8067dc7e92f8d70cf0a2fe7c7c65555409.tar.bz2
fdk-aac-80fa8b8067dc7e92f8d70cf0a2fe7c7c65555409.zip
Clear spatial specific config struct at the beginning of parse routines
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I6e198942f3a065de9615eac544fdc73120d24b1e
Diffstat (limited to 'libSACdec/src')
-rw-r--r--libSACdec/src/sac_bitdec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libSACdec/src/sac_bitdec.cpp b/libSACdec/src/sac_bitdec.cpp
index 45fb17a..159cf84 100644
--- a/libSACdec/src/sac_bitdec.cpp
+++ b/libSACdec/src/sac_bitdec.cpp
@@ -325,6 +325,8 @@ SACDEC_ERROR SpatialDecParseMps212Config(
INT coreSbrFrameLengthIndex) {
int i;
+ FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
+
pSpatialSpecificConfig->stereoConfigIndex = stereoConfigIndex;
pSpatialSpecificConfig->coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
pSpatialSpecificConfig->freqRes =
@@ -447,6 +449,8 @@ SACDEC_ERROR SpatialDecParseSpecificConfig(
int numHeaderBits;
int cfgStartPos, bitsAvailable;
+ FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
+
cfgStartPos = FDKgetValidBits(bitstream);
/* It might be that we do not know the SSC length beforehand. */
if (sacHeaderLen == 0) {