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/psymodel.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/psymodel.c')
-rw-r--r-- | libavcodec/psymodel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c index 2b5f111fbe..93c8408297 100644 --- a/libavcodec/psymodel.c +++ b/libavcodec/psymodel.c @@ -35,8 +35,8 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, int i, j, k = 0; ctx->avctx = avctx; - ctx->ch = av_mallocz_array(sizeof(ctx->ch[0]), avctx->channels * 2); - ctx->group = av_mallocz_array(sizeof(ctx->group[0]), num_groups); + ctx->ch = av_calloc(avctx->channels, 2 * sizeof(ctx->ch[0])); + ctx->group = av_calloc(num_groups, sizeof(ctx->group[0])); ctx->bands = av_malloc_array (sizeof(ctx->bands[0]), num_lens); ctx->num_bands = av_malloc_array (sizeof(ctx->num_bands[0]), num_lens); ctx->cutoff = avctx->cutoff; @@ -120,7 +120,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av FF_FILTER_MODE_LOWPASS, FILT_ORDER, cutoff_coeff, 0.0, 0.0); if (ctx->fcoeffs) { - ctx->fstate = av_mallocz_array(sizeof(ctx->fstate[0]), avctx->channels); + ctx->fstate = av_calloc(avctx->channels, sizeof(ctx->fstate[0])); if (!ctx->fstate) { av_free(ctx->fcoeffs); av_free(ctx); |