aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src/drcGainDec_init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libDRCdec/src/drcGainDec_init.cpp')
-rw-r--r--libDRCdec/src/drcGainDec_init.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libDRCdec/src/drcGainDec_init.cpp b/libDRCdec/src/drcGainDec_init.cpp
index 38f3243..c9f87d7 100644
--- a/libDRCdec/src/drcGainDec_init.cpp
+++ b/libDRCdec/src/drcGainDec_init.cpp
@@ -336,9 +336,11 @@ initActiveDrcOffset(HANDLE_DRC_GAIN_DECODER hGainDec) {
for (a = 0; a < hGainDec->nActiveDrcs; a++) {
hGainDec->activeDrc[a].activeDrcOffset = accGainElementCount;
accGainElementCount += hGainDec->activeDrc[a].gainElementCount;
+ if (accGainElementCount > 12) {
+ hGainDec->nActiveDrcs = a;
+ return DE_NOT_OK;
+ }
}
- if (accGainElementCount > 12) return DE_NOT_OK;
-
return DE_OK;
}