Commit 55279d69 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snowenc: Set mb_num to avoid ratecontrol floating point divisions by 0.0

Fixes: Ticket7990
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8802e329
......@@ -81,6 +81,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->m.bit_rate= avctx->bit_rate;
s->m.lmin = avctx->mb_lmin;
s->m.lmax = avctx->mb_lmax;
s->m.mb_num = (avctx->width * avctx->height + 255) / 256; // For ratecontrol
s->m.me.temp =
s->m.me.scratchpad= av_mallocz_array((avctx->width+64), 2*16*2*sizeof(uint8_t));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment