avcodec/libvo-aacenc: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Jan 2015 12:32:55 +0000 (13:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Jan 2015 12:32:55 +0000 (13:32 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libvo-aacenc.c

index 7b38d51..2c4a424 100644 (file)
@@ -65,7 +65,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
     s->last_frame     = 2;
     ff_af_queue_init(avctx, &s->afq);
 
-    s->end_buffer = av_mallocz(avctx->frame_size * avctx->channels * 2);
+    s->end_buffer = av_mallocz_array(avctx->channels, avctx->frame_size * 2);
     if (!s->end_buffer) {
         ret = AVERROR(ENOMEM);
         goto error;