mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/snowenc: Set mb_num to avoid ratecontrol floating point divisions by 0.0
Fixes: Ticket7990
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 55279d699f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0c9ad1c746
commit
e0d167051e
@ -86,6 +86,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));
|
||||
|
Loading…
Reference in New Issue
Block a user