mirror of https://git.ffmpeg.org/ffmpeg.git
shorten: fix lossy decoding
Closes #1299, #1300 and #1301. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
27127ebe6c
commit
672f8226bb
|
@ -539,7 +539,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
|
||||||
sum += s->offset[channel][i];
|
sum += s->offset[channel][i];
|
||||||
coffset = sum / s->nmean;
|
coffset = sum / s->nmean;
|
||||||
if (s->version >= 2)
|
if (s->version >= 2)
|
||||||
coffset >>= FFMIN(1, s->bitshift);
|
coffset = s->bitshift == 0 ? coffset : coffset >> s->bitshift - 1 >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode samples for this channel */
|
/* decode samples for this channel */
|
||||||
|
|
Loading…
Reference in New Issue