Commit 606a49d2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/atrac3: Use av_mallocz_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f0211f41
......@@ -918,7 +918,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
avpriv_float_dsp_init(&q->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&q->fmt_conv, avctx);
q->units = av_mallocz(sizeof(*q->units) * avctx->channels);
q->units = av_mallocz_array(avctx->channels, sizeof(*q->units));
if (!q->units) {
atrac3_decode_close(avctx);
return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment