aacenc_ltp: fix assertion

A value of 2048 will overflow 11 bits.
This commit is contained in:
Rostislav Pehlivanov 2015-10-17 11:58:33 +01:00
parent 92a26261d1
commit 780dba01f9

View File

@ -101,7 +101,7 @@ void ff_aac_update_ltp(AACEncContext *s, SingleChannelElement *sce)
lag = i; 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) { if (!lag) {
sce->ics.ltp.lag = lag; sce->ics.ltp.lag = lag;