]> git.sesse.net Git - ffmpeg/commitdiff
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 7b38d518a242cb29cef2479281642af98971a37d..2c4a424252e0412b45af524af90deecfbeb99268 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;