Browse Source

aacenc_ltp: fix assertion

A value of 2048 will overflow 11 bits.
tags/n3.0
Rostislav Pehlivanov 10 years ago
parent
commit
780dba01f9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/aacenc_ltp.c

+ 1
- 1
libavcodec/aacenc_ltp.c View File

@@ -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;


Loading…
Cancel
Save