summaryrefslogtreecommitdiff
path: root/libavcodec/cngdec.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/cngdec.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/cngdec.c')
-rw-r--r--libavcodec/cngdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index 57cb620179..ecfd4abfc9 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -61,12 +61,12 @@ static av_cold int cng_decode_init(AVCodecContext *avctx)
p->order = 12;
avctx->frame_size = 640;
- p->refl_coef = av_mallocz_array(p->order, sizeof(*p->refl_coef));
- p->target_refl_coef = av_mallocz_array(p->order, sizeof(*p->target_refl_coef));
- p->lpc_coef = av_mallocz_array(p->order, sizeof(*p->lpc_coef));
- p->filter_out = av_mallocz_array(avctx->frame_size + p->order,
+ p->refl_coef = av_calloc(p->order, sizeof(*p->refl_coef));
+ p->target_refl_coef = av_calloc(p->order, sizeof(*p->target_refl_coef));
+ p->lpc_coef = av_calloc(p->order, sizeof(*p->lpc_coef));
+ p->filter_out = av_calloc(avctx->frame_size + p->order,
sizeof(*p->filter_out));
- p->excitation = av_mallocz_array(avctx->frame_size, sizeof(*p->excitation));
+ p->excitation = av_calloc(avctx->frame_size, sizeof(*p->excitation));
if (!p->refl_coef || !p->target_refl_coef || !p->lpc_coef ||
!p->filter_out || !p->excitation) {
return AVERROR(ENOMEM);