mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/wmaenc: Check operations that can fail
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
08fcb43aff
commit
20232cbbf7
@ -88,8 +88,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
return ret;
|
||||
|
||||
/* init MDCT */
|
||||
for (i = 0; i < s->nb_block_sizes; i++)
|
||||
ff_mdct_init(&s->mdct_ctx[i], s->frame_len_bits - i + 1, 0, 1.0);
|
||||
for (i = 0; i < s->nb_block_sizes; i++) {
|
||||
ret = ff_mdct_init(&s->mdct_ctx[i], s->frame_len_bits - i + 1, 0, 1.0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
block_align = avctx->bit_rate * (int64_t) s->frame_len /
|
||||
(avctx->sample_rate * 8);
|
||||
|
Loading…
Reference in New Issue
Block a user