Browse Source

Use correct value for range

The current range value causes an underflow
when negated and pushes anything less than zero
to the minimum.
tags/n0.9
Mashiat Sarker Shakkhar 13 years ago
parent
commit
29c2fcb677
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/wmalosslessdec.c

+ 1
- 1
libavcodec/wmalosslessdec.c View File

@@ -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) {


Loading…
Cancel
Save