diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-14 21:31:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-20 01:03:52 +0200 |
commit | 1ea365082318f06cd42a8b37dd0c7724b599c821 (patch) | |
tree | 4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libavcodec/vorbisenc.c | |
parent | 4b154743163ffbe3fdc50759c0c55dc854636488 (diff) | |
download | ffmpeg-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 'libavcodec/vorbisenc.c')
-rw-r--r-- | libavcodec/vorbisenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index 72c6ba1130..858c6ac6dd 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -182,7 +182,7 @@ static int ready_codebook(vorbis_enc_codebook *cb) } else { int vals = cb_lookup_vals(cb->lookup, cb->ndimensions, cb->nentries); cb->dimensions = av_malloc_array(cb->nentries, sizeof(float) * cb->ndimensions); - cb->pow2 = av_mallocz_array(cb->nentries, sizeof(float)); + cb->pow2 = av_calloc(cb->nentries, sizeof(*cb->pow2)); if (!cb->dimensions || !cb->pow2) return AVERROR(ENOMEM); for (i = 0; i < cb->nentries; i++) { @@ -212,7 +212,7 @@ static int ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc) { int i; av_assert0(rc->type == 2); - rc->maxes = av_mallocz_array(rc->classifications, sizeof(float[2])); + rc->maxes = av_calloc(rc->classifications, sizeof(*rc->maxes)); if (!rc->maxes) return AVERROR(ENOMEM); for (i = 0; i < rc->classifications; i++) { |