avcodec/atrac3: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/68/merge
Michael Niedermayer 11 years ago
parent f0211f4189
commit 606a49d2e6
  1. 2
      libavcodec/atrac3.c

@ -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);

Loading…
Cancel
Save