summaryrefslogtreecommitdiff
path: root/libavcodec/motionpixels.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-14 21:31:53 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 01:03:52 +0200
commit1ea365082318f06cd42a8b37dd0c7724b599c821 (patch)
tree4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libavcodec/motionpixels.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (diff)
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>
Diffstat (limited to 'libavcodec/motionpixels.c')
-rw-r--r--libavcodec/motionpixels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 1896330fe1..7ac9634538 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -80,10 +80,10 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
mp->avctx = avctx;
ff_bswapdsp_init(&mp->bdsp);
- mp->changes_map = av_mallocz_array(avctx->width, h4);
+ mp->changes_map = av_calloc(avctx->width, h4);
mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1;
- mp->vpt = av_mallocz_array(avctx->height, sizeof(YuvPixel));
- mp->hpt = av_mallocz_array(h4 / 4, w4 / 4 * sizeof(YuvPixel));
+ mp->vpt = av_calloc(avctx->height, sizeof(*mp->vpt));
+ mp->hpt = av_calloc(h4 / 4, w4 / 4 * sizeof(*mp->hpt));
if (!mp->changes_map || !mp->vpt || !mp->hpt)
return AVERROR(ENOMEM);
avctx->pix_fmt = AV_PIX_FMT_RGB555;