Merge commit '02ec656af72030eea4f3d63e30b25625cce6a3df'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 30 Jun 2013 11:22:24 +0000 (13:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 30 Jun 2013 11:35:36 +0000 (13:35 +0200)
* commit '02ec656af72030eea4f3d63e30b25625cce6a3df':
  wmapro: error out on impossible scale factor offsets

The check is replaced by an assert(), as the condition cannot be
true except through bugs elsewhere (which should have been fixed
already)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/wmaprodec.c

@@@ -439,8 -435,9 +439,10 @@@ static av_cold int decode_init(AVCodecC
                             + s->sfb_offsets[i][b + 1] - 1) << i) >> 1;
              for (x = 0; x < num_possible_block_sizes; x++) {
                  int v = 0;
--                while (s->sfb_offsets[x][v + 1] << x < offset)
-                     ++v;
 -                    if (++v >= MAX_BANDS)
 -                        return AVERROR_INVALIDDATA;
++                while (s->sfb_offsets[x][v + 1] << x < offset) {
++                    v++;
++                    av_assert0(v < MAX_BANDS);
++                }
                  s->sf_offsets[i][x][b] = v;
              }
          }