mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-17 21:14:47 +00:00
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];
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user