Replace all occurences of av_mallocz_array() by av_calloc()

They do the same.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-14 21:31:53 +02:00
parent 4b15474316
commit 1ea3650823
131 changed files with 302 additions and 301 deletions

View file

@ -429,7 +429,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
if (pic->nb_slices == 0)
pic->nb_slices = ctx->nb_slices;
if (pic->nb_slices > 0) {
pic->slices = av_mallocz_array(pic->nb_slices, sizeof(*pic->slices));
pic->slices = av_calloc(pic->nb_slices, sizeof(*pic->slices));
if (!pic->slices) {
err = AVERROR(ENOMEM);
goto fail;
@ -511,7 +511,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
nb_roi = ctx->roi_max_regions;
}
pic->roi = av_mallocz_array(nb_roi, sizeof(*pic->roi));
pic->roi = av_calloc(nb_roi, sizeof(*pic->roi));
if (!pic->roi) {
err = AVERROR(ENOMEM);
goto fail;