summaryrefslogtreecommitdiff
path: root/libavfilter/af_silencedetect.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 /libavfilter/af_silencedetect.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (diff)
downloadffmpeg-1ea365082318f06cd42a8b37dd0c7724b599c821.tar.gz
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 'libavfilter/af_silencedetect.c')
-rw-r--r--libavfilter/af_silencedetect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index 93ec5f7171..eb38d2811c 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -169,7 +169,8 @@ static int config_input(AVFilterLink *inlink)
s->channels = inlink->channels;
s->duration = av_rescale(s->duration, inlink->sample_rate, AV_TIME_BASE);
s->independent_channels = s->mono ? s->channels : 1;
- s->nb_null_samples = av_mallocz_array(sizeof(*s->nb_null_samples), s->independent_channels);
+ s->nb_null_samples = av_calloc(s->independent_channels,
+ sizeof(*s->nb_null_samples));
if (!s->nb_null_samples)
return AVERROR(ENOMEM);
s->start = av_malloc_array(sizeof(*s->start), s->independent_channels);