ffmpeg | branch: master | Rostislav Pehlivanov <atomnu...@gmail.com> | Sat Oct 
17 11:58:33 2015 +0100| [780dba01f9aed8c9b6ba05eceac2fe3eac71198b] | committer: 
Rostislav Pehlivanov

aacenc_ltp: fix assertion

A value of 2048 will overflow 11 bits.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=780dba01f9aed8c9b6ba05eceac2fe3eac71198b
---

 libavcodec/aacenc_ltp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c
index 066e195..0bd8954 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to