Browse Source

Merge commit '02ec656af72030eea4f3d63e30b25625cce6a3df'

* 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>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
c1fc4ff937
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavcodec/wmaprodec.c

+ 4
- 2
libavcodec/wmaprodec.c View File

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


Loading…
Cancel
Save