diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-06 13:39:45 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-21 02:44:06 +0200 |
commit | a6f7b320851ad00bdc7802a6876c1eb118394d0c (patch) | |
tree | f10d4515eb2fad49a217f7516441c8db20d7d78f /libavcodec/ratecontrol.c | |
parent | 36af32f9e5d3e9df039885c6071a13868d60fdd1 (diff) | |
download | ffmpeg-a6f7b320851ad00bdc7802a6876c1eb118394d0c.tar.gz |
avcodec/ratecontrol: Fix wrong sizeof expression
Fixes Coverity issue #1644200.
Introduced in 89a8033fc918b2f0ef435e5a3077455ceb8ff913.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 06d998efcb..3dc44683d0 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -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; |