summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libAACdec/src/aacdec_hcr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fdk-aac/libAACdec/src/aacdec_hcr.cpp')
-rw-r--r--fdk-aac/libAACdec/src/aacdec_hcr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fdk-aac/libAACdec/src/aacdec_hcr.cpp b/fdk-aac/libAACdec/src/aacdec_hcr.cpp
index 6114756..26fdd97 100644
--- a/fdk-aac/libAACdec/src/aacdec_hcr.cpp
+++ b/fdk-aac/libAACdec/src/aacdec_hcr.cpp
@@ -1423,6 +1423,9 @@ static INT DecodeEscapeSequence(HANDLE_FDK_BITSTREAM bs, const INT bsAnchor,
sign = (quantSpecCoef >= 0) ? 1 : -1;
+ if (escapeOnesCounter > 30)
+ escapeOnesCounter = 30;
+
quantSpecCoef = sign * (((INT)1 << escapeOnesCounter) + escape_word);
return quantSpecCoef;