aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-22 13:37:52 -0500
committerReinhard Tartler <siretart@tauware.de>2011-12-24 15:47:57 +0100
commit92b964969b228799fded70827d8b78044aff5019 (patch)
tree016e42eb8e27079988514b6ba87099bfbd83e089 /libavcodec
parentca87ec53e9c7fb5d79847e8d8fc33553d2d52310 (diff)
downloadffmpeg-92b964969b228799fded70827d8b78044aff5019.tar.gz
wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
The initial values are not checked against the number of block sizes. Initializing them to frame_len_bits will result in a block size index of 0 in these cases instead of something that might be out-of-range. Fixes Bug 81. (cherry picked from commit 05d1e45d1f42cc90d1f2f36c546d0096cea126a8) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit 8dba5608dcf76032d8a9aa4bd8a3fc1392682281) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/wma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index 65780459aa..45d431a2b1 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -135,6 +135,9 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
/* compute MDCT block size */
s->frame_len_bits = ff_wma_get_frame_len_bits(s->sample_rate, s->version, 0);
+ s->next_block_len_bits = s->frame_len_bits;
+ s->prev_block_len_bits = s->frame_len_bits;
+ s->block_len_bits = s->frame_len_bits;
s->frame_len = 1 << s->frame_len_bits;
if (s->use_variable_block_len) {