aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-12-29 06:16:57 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-29 06:16:57 -0800
commit0ef6247c4f898e9259872d3565a604d7bebbf36d (patch)
tree23119deece54255ff25a8f1db6c124cf65fe9083
parent005d5690b6fe8fd0d0f624c34ddf9b578815525d (diff)
parent0142f389049f4f291908af7812d83d959ea52b48 (diff)
downloadfdk-aac-0ef6247c4f898e9259872d3565a604d7bebbf36d.tar.gz
fdk-aac-0ef6247c4f898e9259872d3565a604d7bebbf36d.tar.bz2
fdk-aac-0ef6247c4f898e9259872d3565a604d7bebbf36d.zip
Merge "Clear spatial specific config struct at the beginning of parse routines"
am: 0142f38904 Change-Id: I0e63ee92cbfb9cfec24b6e1adfb77e5929dad0e1
-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) {