aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-30 13:22:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-30 13:35:36 +0200
commitc1fc4ff937cd923dd8221ce8dcbf3d7fd6cecb76 (patch)
tree6f21733cbef7f46ad243c5f375db2ceb02a9089c /libavcodec/wmaprodec.c
parent490ed7f0eccfeba0685ac3148ef9047fd4d92de3 (diff)
parent02ec656af72030eea4f3d63e30b25625cce6a3df (diff)
downloadffmpeg-c1fc4ff937cd923dd8221ce8dcbf3d7fd6cecb76.tar.gz
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>
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 46accde81e..c4e0b0af63 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -439,8 +439,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
+ 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;
+ while (s->sfb_offsets[x][v + 1] << x < offset) {
+ v++;
+ av_assert0(v < MAX_BANDS);
+ }
s->sf_offsets[i][x][b] = v;
}
}