From 1ea365082318f06cd42a8b37dd0c7724b599c821 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 14 Sep 2021 21:31:53 +0200 Subject: Replace all occurences of av_mallocz_array() by av_calloc() They do the same. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fftools/ffmpeg_opt.c') diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 6ca28cf974..8c1d96ccf8 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2591,7 +2591,7 @@ loop_end: count = 0; while (ost->enc->pix_fmts[count] != AV_PIX_FMT_NONE) count++; - f->formats = av_mallocz_array(count + 1, sizeof(*f->formats)); + f->formats = av_calloc(count + 1, sizeof(*f->formats)); if (!f->formats) exit_program(1); memcpy(f->formats, ost->enc->pix_fmts, (count + 1) * sizeof(*f->formats)); @@ -2604,7 +2604,7 @@ loop_end: count = 0; while (ost->enc->sample_fmts[count] != AV_SAMPLE_FMT_NONE) count++; - f->formats = av_mallocz_array(count + 1, sizeof(*f->formats)); + f->formats = av_calloc(count + 1, sizeof(*f->formats)); if (!f->formats) exit_program(1); memcpy(f->formats, ost->enc->sample_fmts, (count + 1) * sizeof(*f->formats)); @@ -2615,7 +2615,7 @@ loop_end: count = 0; while (ost->enc->supported_samplerates[count]) count++; - f->sample_rates = av_mallocz_array(count + 1, sizeof(*f->sample_rates)); + f->sample_rates = av_calloc(count + 1, sizeof(*f->sample_rates)); if (!f->sample_rates) exit_program(1); memcpy(f->sample_rates, ost->enc->supported_samplerates, @@ -2627,7 +2627,7 @@ loop_end: count = 0; while (ost->enc->channel_layouts[count]) count++; - f->channel_layouts = av_mallocz_array(count + 1, sizeof(*f->channel_layouts)); + f->channel_layouts = av_calloc(count + 1, sizeof(*f->channel_layouts)); if (!f->channel_layouts) exit_program(1); memcpy(f->channel_layouts, ost->enc->channel_layouts, -- cgit v1.2.3