diff options
author | Martin Storsjo <martin@martin.st> | 2022-01-10 13:44:04 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2022-01-10 13:55:34 +0200 |
commit | 41ae84525e66febd33ea1fa0130a5b46610f4173 (patch) | |
tree | 2e7f66da35feda4d6136c3a9e970ebee254d0c2d /libDRCdec/src/drcDec_reader.cpp | |
parent | 573e93e4d0d08127dd3b2297a0ce52221527d90a (diff) | |
parent | dd6d9f9f6c9d095bd159d4f0d8b36a6b7e6057a8 (diff) | |
download | fdk-aac-41ae84525e66febd33ea1fa0130a5b46610f4173.tar.gz fdk-aac-41ae84525e66febd33ea1fa0130a5b46610f4173.tar.bz2 fdk-aac-41ae84525e66febd33ea1fa0130a5b46610f4173.zip |
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libDRCdec/src/drcDec_reader.cpp')
-rw-r--r-- | libDRCdec/src/drcDec_reader.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libDRCdec/src/drcDec_reader.cpp b/libDRCdec/src/drcDec_reader.cpp index ca35345..b080f50 100644 --- a/libDRCdec/src/drcDec_reader.cpp +++ b/libDRCdec/src/drcDec_reader.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -512,10 +512,13 @@ drcDec_readUniDrcGain(HANDLE_FDK_BITSTREAM hBs, fMin(tmpNNodes, (UCHAR)16) * sizeof(GAIN_NODE)); } - hUniDrcGain->uniDrcGainExtPresent = FDKreadBits(hBs, 1); - if (hUniDrcGain->uniDrcGainExtPresent == 1) { - err = _readUniDrcGainExtension(hBs, &(hUniDrcGain->uniDrcGainExtension)); - if (err) return err; + if (pCoef && (gainSequenceCount == + pCoef->gainSequenceCount)) { /* all sequences have been read */ + hUniDrcGain->uniDrcGainExtPresent = FDKreadBits(hBs, 1); + if (hUniDrcGain->uniDrcGainExtPresent == 1) { + err = _readUniDrcGainExtension(hBs, &(hUniDrcGain->uniDrcGainExtension)); + if (err) return err; + } } if (err == DE_OK && gainSequenceCount > 0) { |