diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 833a817561..22fdcff403 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -156,7 +156,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer) if (s->bitshift != 0) for (i = 0; i < s->blocksize; i++) - buffer[s->nwrap + i] <<= s->bitshift; + buffer[i] <<= s->bitshift; }