diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbcdec.c index 8a6dbe0b75..50012c0231 100644 --- a/libavcodec/ilbcdec.c +++ b/libavcodec/ilbcdec.c @@ -1303,7 +1303,8 @@ static int xcorr_coeff(int16_t *target, int16_t *regressor, pos += step; /* Do a +/- to get the next energy */ - energy += step * ((*rp_end * *rp_end - *rp_beg * *rp_beg) >> shifts); + energy += (unsigned)step * ((*rp_end * *rp_end - *rp_beg * *rp_beg) >> shifts); + rp_beg += step; rp_end += step; }