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 05d1e45d1f
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
7ce728050b
commit
8dba5608dc
@@ -137,6 +137,9 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
|
|||||||
|
|
||||||
/* compute MDCT block size */
|
/* compute MDCT block size */
|
||||||
s->frame_len_bits = ff_wma_get_frame_len_bits(s->sample_rate, s->version, 0);
|
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;
|
s->frame_len = 1 << s->frame_len_bits;
|
||||||
if (s->use_variable_block_len) {
|
if (s->use_variable_block_len) {
|
||||||
|
Reference in New Issue
Block a user