From de29d482f9ee8d9cea9c58a1370ab99028adff3f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 1 Jan 2022 12:30:19 +0100 Subject: [PATCH] avcodec/mpegvideo: Avoid macro/av_calloc for ordinary allocations Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index af433153f2..e9f2fb212a 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -632,9 +632,9 @@ int ff_mpv_init_context_frame(MpegEncContext *s) if (s->out_format == FMT_H263) { /* cbp values, cbp, ac_pred, pred_dir */ - if (!FF_ALLOCZ_TYPED_ARRAY(s->coded_block_base, y_size + (s->mb_height&1)*2*s->b8_stride) || - !FF_ALLOCZ_TYPED_ARRAY(s->cbp_table, mb_array_size) || - !FF_ALLOCZ_TYPED_ARRAY(s->pred_dir_table, mb_array_size)) + if (!(s->coded_block_base = av_mallocz(y_size + (s->mb_height&1)*2*s->b8_stride)) || + !(s->cbp_table = av_mallocz(mb_array_size)) || + !(s->pred_dir_table = av_mallocz(mb_array_size))) return AVERROR(ENOMEM); s->coded_block = s->coded_block_base + s->b8_stride + 1; } @@ -652,9 +652,9 @@ int ff_mpv_init_context_frame(MpegEncContext *s) } /* which mb is an intra block, init macroblock skip table */ - if (!FF_ALLOC_TYPED_ARRAY(s->mbintra_table, mb_array_size) || + if (!(s->mbintra_table = av_mallocz(mb_array_size)) || // Note the + 1 is for a quicker MPEG-4 slice_end detection - !FF_ALLOCZ_TYPED_ARRAY(s->mbskip_table, mb_array_size + 2)) + !(s->mbskip_table = av_mallocz(mb_array_size + 2))) return AVERROR(ENOMEM); memset(s->mbintra_table, 1, mb_array_size);