diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c index 0bd895472a..6e59a3ffef 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, 2047); /* 11 bits => 2^11 = 0->2047 */ + lag = av_clip_uintp2(lag, 11); /* 11 bits => 2^11 = 0->2047 */ if (!lag) { sce->ics.ltp.lag = lag;