general: fix warning 'av_malloc_array' sizes specified with 'sizeof'

in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

Fixes trac ticket #11620
This commit is contained in:
Baptiste Coudurier 2025-06-06 13:42:28 -07:00
parent 00225e9ebc
commit ef60d5ac32
11 changed files with 18 additions and 18 deletions

View file

@ -52,7 +52,7 @@ static int vaapi_encode_make_packed_header(AVCodecContext *avctx,
.has_emulation_bytes = 1,
};
tmp = av_realloc_array(pic->param_buffers, sizeof(*tmp), pic->nb_param_buffers + 2);
tmp = av_realloc_array(pic->param_buffers, pic->nb_param_buffers + 2, sizeof(*tmp));
if (!tmp)
return AVERROR(ENOMEM);
pic->param_buffers = tmp;
@ -93,7 +93,7 @@ static int vaapi_encode_make_param_buffer(AVCodecContext *avctx,
VABufferID *tmp;
VABufferID buffer;
tmp = av_realloc_array(pic->param_buffers, sizeof(*tmp), pic->nb_param_buffers + 1);
tmp = av_realloc_array(pic->param_buffers, pic->nb_param_buffers + 1, sizeof(*tmp));
if (!tmp)
return AVERROR(ENOMEM);
pic->param_buffers = tmp;