aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src/drcDec_gainDecoder.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-01 14:25:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-01 14:25:25 +0200
commite778887e4e5589528b06b04404ce4c71aaae267a (patch)
treefcce7bfb237a99ac174e16611f39bf363f6b280c /libDRCdec/src/drcDec_gainDecoder.cpp
parent97182034e8829014bdfc0449c2116d629196f1d4 (diff)
parent801f67f671929311e0c9952c5f92d6e147c7b003 (diff)
downloadfdk-aac-e778887e4e5589528b06b04404ce4c71aaae267a.tar.gz
fdk-aac-e778887e4e5589528b06b04404ce4c71aaae267a.tar.bz2
fdk-aac-e778887e4e5589528b06b04404ce4c71aaae267a.zip
Merge v2.0.2 into dabplus2
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;