summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libSACdec/src/sac_bitdec.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-16 10:15:54 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-16 10:15:54 +0200
commitac10ac25317d2027e21b1390054e47201e7aec98 (patch)
tree4b1114b5806709d99634c1b1571e3fe1ed0a7417 /fdk-aac/libSACdec/src/sac_bitdec.cpp
parentc9b14925962bf6ca3978dc07bf8db32ada7003c5 (diff)
downloadODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.tar.gz
ODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.tar.bz2
ODR-AudioEnc-ac10ac25317d2027e21b1390054e47201e7aec98.zip
Update fdk-aac
This corresponds to 9718203 in https://github.com/Opendigitalradio/fdk-aac
Diffstat (limited to 'fdk-aac/libSACdec/src/sac_bitdec.cpp')
-rw-r--r--fdk-aac/libSACdec/src/sac_bitdec.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/fdk-aac/libSACdec/src/sac_bitdec.cpp b/fdk-aac/libSACdec/src/sac_bitdec.cpp
index 883e1e8..062eb1c 100644
--- a/fdk-aac/libSACdec/src/sac_bitdec.cpp
+++ b/fdk-aac/libSACdec/src/sac_bitdec.cpp
@@ -448,6 +448,7 @@ SACDEC_ERROR SpatialDecParseSpecificConfig(
int bsFreqRes, b3DaudioMode = 0;
int numHeaderBits;
int cfgStartPos, bitsAvailable;
+ int treeConfig;
FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
@@ -488,13 +489,13 @@ SACDEC_ERROR SpatialDecParseSpecificConfig(
pSpatialSpecificConfig->freqRes =
(SPATIALDEC_FREQ_RES)freqResTable_LD[bsFreqRes];
- pSpatialSpecificConfig->treeConfig =
- (SPATIALDEC_TREE_CONFIG)FDKreadBits(bitstream, 4);
+ treeConfig = FDKreadBits(bitstream, 4);
- if (pSpatialSpecificConfig->treeConfig != SPATIALDEC_MODE_RSVD7) {
+ if (treeConfig != SPATIALDEC_MODE_RSVD7) {
err = MPS_UNSUPPORTED_CONFIG;
goto bail;
}
+ pSpatialSpecificConfig->treeConfig = (SPATIALDEC_TREE_CONFIG) treeConfig;
{
pSpatialSpecificConfig->nOttBoxes =
@@ -1457,7 +1458,7 @@ static SACDEC_ERROR mapIndexData(
FIXP_DBL (*pOttVsTotDb1)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
FIXP_DBL (*pOttVsTotDb2)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS]) {
int aParamSlots[MAX_PARAMETER_SETS];
- int aInterpolate[MAX_PARAMETER_SETS];
+ int aInterpolate[MAX_PARAMETER_SETS] = {0};
int dataSets;
int aMap[MAX_PARAMETER_BANDS + 1];
@@ -1562,6 +1563,7 @@ static SACDEC_ERROR mapIndexData(
i2 = i;
while (aInterpolate[i2] == 1) {
i2++;
+ if (i2 >= MAX_PARAMETER_SETS) return MPS_WRONG_PARAMETERSETS;
}
x1 = paramSlot[i1];
xi = paramSlot[i];