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

@@ -1370,9 +1370,9 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
frame->linesize[0] = pool->linesize[0];
if (planes > AV_NUM_DATA_POINTERS) {
frame->extended_data = av_mallocz_array(planes, sizeof(*frame->extended_data));
frame->extended_data = av_calloc(planes, sizeof(*frame->extended_data));
frame->nb_extended_buf = planes - AV_NUM_DATA_POINTERS;
frame->extended_buf = av_mallocz_array(frame->nb_extended_buf,
frame->extended_buf = av_calloc(frame->nb_extended_buf,
sizeof(*frame->extended_buf));
if (!frame->extended_data || !frame->extended_buf) {
av_freep(&frame->extended_data);