diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index f9e3c6caca..4a5d967300 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -696,7 +696,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data, if (s->version < 2) s->offset[channel][s->nmean - 1] = sum / s->blocksize; else - s->offset[channel][s->nmean - 1] = s->bitshift == 32 ? 0 : (sum / s->blocksize) << s->bitshift; + s->offset[channel][s->nmean - 1] = s->bitshift == 32 ? 0 : (sum / s->blocksize) * (1 << s->bitshift); } /* copy wrap samples for use with next block */