diff options
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/env_calc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp index 1242833..2efff4f 100644 --- a/libSBRdec/src/env_calc.cpp +++ b/libSBRdec/src/env_calc.cpp @@ -1477,8 +1477,10 @@ void calculateSbrEnvelope( for (k = 0; k < noSubbands; k++) { int sc = scale_change - pNrgs->nrgGain_e[k] + (sc_change - 1); - pNrgs->nrgGain[k] >>= sc; pNrgs->nrgGain_e[k] += sc; + if (sc > 31) + sc = 31; + pNrgs->nrgGain[k] >>= sc; } if (!useLP) { |