[FFmpeg-cvslog] avcodec/ac3enc_float: use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Apr 8 15:53:07 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 15:35:47 2014 +0200| [c8a1f10cf486faa204aeeda5dac2d23912103cc3] | committer: Michael Niedermayer

avcodec/ac3enc_float: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8a1f10cf486faa204aeeda5dac2d23912103cc3
---

 libavcodec/ac3enc_float.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 35fb418..55ea422 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -73,7 +73,7 @@ av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
     n  = 1 << 9;
     n2 = n >> 1;
 
-    window = av_malloc(n * sizeof(*window));
+    window = av_malloc_array(n, sizeof(*window));
     if (!window) {
         av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list