diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index d2a782e8dd..9eeb836523 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -354,7 +354,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) { } } - pctx->ch = av_mallocz(sizeof(AacPsyChannel) * ctx->avctx->channels); + pctx->ch = av_mallocz_array(ctx->avctx->channels, sizeof(AacPsyChannel)); lame_window_init(pctx, ctx->avctx);