diff options
author | Mashiat Sarker Shakkhar <shahriman_ams@yahoo.com> | 2011-12-02 03:11:21 +0600 |
---|---|---|
committer | Mashiat Sarker Shakkhar <shahriman_ams@yahoo.com> | 2011-12-02 03:11:21 +0600 |
commit | 29c2fcb6776f80a0a5551bb82b43bc14c8202331 (patch) | |
tree | 0530b76fa89c10fea9653f1c51139bf7e61f86f6 /libavcodec | |
parent | 768261e50d70fd8129b0f1672a48451344a220e9 (diff) | |
download | ffmpeg-29c2fcb6776f80a0a5551bb82b43bc14c8202331.tar.gz |
Use correct value for range
The current range value causes an underflow
when negated and pushes anything less than zero
to the minimum.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 3b3ff0f749..5a7957db61 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -895,7 +895,7 @@ static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int16_t input, int1 { int16_t icoef; int recent = s->cdlms[ich][ilms].recent; - int16_t range = 1 << (s->bits_per_sample - 1); + int16_t range = (1 << s->bits_per_sample - 1) - 1; int bps = s->bits_per_sample > 16 ? 4 : 2; // bytes per sample if (input > pred) { |