mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/wmaprodec: Fix overflow of cutoff
Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c56f8303e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0e3ec7db53
commit
16c5da92d9
@ -477,7 +477,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
/** calculate subwoofer cutoff values */
|
||||
for (i = 0; i < num_possible_block_sizes; i++) {
|
||||
int block_size = s->samples_per_frame >> i;
|
||||
int cutoff = (440*block_size + 3 * (s->avctx->sample_rate >> 1) - 1)
|
||||
int cutoff = (440*block_size + 3LL * (s->avctx->sample_rate >> 1) - 1)
|
||||
/ s->avctx->sample_rate;
|
||||
s->subwoofer_cutoffs[i] = av_clip(cutoff, 4, block_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user