Commit 672f8226 authored by Paul B Mahol's avatar Paul B Mahol

shorten: fix lossy decoding

Closes #1299, #1300 and #1301.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 27127ebe
......@@ -539,7 +539,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
sum += s->offset[channel][i];
coffset = sum / s->nmean;
if (s->version >= 2)
coffset >>= FFMIN(1, s->bitshift);
coffset = s->bitshift == 0 ? coffset : coffset >> s->bitshift - 1 >> 1;
}
/* decode samples for this channel */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment