You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/ratecontrol: Fix wrong sizeof expression
Fixes Coverity issue #1644200.
Introduced in 89a8033fc9
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -699,7 +699,7 @@ av_cold int ff_rate_control_init(MPVMainEncContext *const m)
|
||||
if (s->adaptive_quant) {
|
||||
unsigned mb_array_size = s->c.mb_stride * s->c.mb_height;
|
||||
|
||||
rcc->cplx_tab = av_malloc_array(mb_array_size, 2 * sizeof(rcc->cplx_tab));
|
||||
rcc->cplx_tab = av_malloc_array(mb_array_size, 2 * sizeof(*rcc->cplx_tab));
|
||||
if (!rcc->cplx_tab)
|
||||
return AVERROR(ENOMEM);
|
||||
rcc->bits_tab = rcc->cplx_tab + mb_array_size;
|
||||
|
Reference in New Issue
Block a user