1
0
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:
Andreas Rheinhardt
2025-05-06 13:39:45 +02:00
parent 36af32f9e5
commit a6f7b32085

View File

@ -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;