aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src/drcDec_gainDecoder.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-09-08 16:53:57 -0700
committerXin Li <delphij@google.com>2020-09-08 16:53:57 -0700
commit7f7e67fe023aa5e479aba0388a7e3fb591bda4e5 (patch)
tree0e353968c34e8c9699663a9b252836b70847c30b /libDRCdec/src/drcDec_gainDecoder.cpp
parent946a672b0f5b8481eb3a429f854fcb34d847d692 (diff)
parent7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45 (diff)
downloadfdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.tar.gz
fdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.tar.bz2
fdk-aac-7f7e67fe023aa5e479aba0388a7e3fb591bda4e5.zip
Merge Android R
Bug: 168057903 Merged-In: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77 Change-Id: I29b7ae1003fb72aeb5fbf1fdfdceea849c1c12b8
Diffstat (limited to 'libDRCdec/src/drcDec_gainDecoder.cpp')
-rw-r--r--libDRCdec/src/drcDec_gainDecoder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libDRCdec/src/drcDec_gainDecoder.cpp b/libDRCdec/src/drcDec_gainDecoder.cpp
index 9d91267..de54dde 100644
--- a/libDRCdec/src/drcDec_gainDecoder.cpp
+++ b/libDRCdec/src/drcDec_gainDecoder.cpp
@@ -297,9 +297,11 @@ drcDec_GainDecoder_Conceal(HANDLE_DRC_GAIN_DECODER hGainDec,
int seq, gainSequenceCount;
DRC_COEFFICIENTS_UNI_DRC* pCoef =
selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
- if (pCoef == NULL) return DE_OK;
-
- gainSequenceCount = fMin(pCoef->gainSequenceCount, (UCHAR)12);
+ if (pCoef && pCoef->gainSequenceCount) {
+ gainSequenceCount = fMin(pCoef->gainSequenceCount, (UCHAR)12);
+ } else {
+ gainSequenceCount = 1;
+ }
for (seq = 0; seq < gainSequenceCount; seq++) {
int lastNodeIndex = 0;