summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc_ltp.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-10-17 11:58:33 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-10-17 12:00:30 +0100
commit780dba01f9aed8c9b6ba05eceac2fe3eac71198b (patch)
tree807d78c21c947289683ebeb65f01745fbb3462a8 /libavcodec/aacenc_ltp.c
parent92a26261d1ccc02c4fbdae2031e279009804c159 (diff)
aacenc_ltp: fix assertion
A value of 2048 will overflow 11 bits.
Diffstat (limited to 'libavcodec/aacenc_ltp.c')
-rw-r--r--libavcodec/aacenc_ltp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c
index 066e1952e7..0bd895472a 100644
--- a/libavcodec/aacenc_ltp.c
+++ b/libavcodec/aacenc_ltp.c
@@ -101,7 +101,7 @@ void ff_aac_update_ltp(AACEncContext *s, SingleChannelElement *sce)
lag = i;
}
}
- lag = av_clip(lag, 0, 2048); /* 11 bits => 2^11 = 2048 */
+ lag = av_clip(lag, 0, 2047); /* 11 bits => 2^11 = 0->2047 */
if (!lag) {
sce->ics.ltp.lag = lag;