[FFmpeg-cvslog] avcodec/opus_imdct: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Jan 13 00:17:25 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 12 23:11:44 2015 +0100| [24222cc1d5caaeaad8df69904bc546bf9d34caa3] | committer: Michael Niedermayer

avcodec/opus_imdct: Use av_malloc_array()

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

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

 libavcodec/opus_imdct.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/opus_imdct.c b/libavcodec/opus_imdct.c
index 0a6fca9..126e882 100644
--- a/libavcodec/opus_imdct.c
+++ b/libavcodec/opus_imdct.c
@@ -105,11 +105,11 @@ av_cold int ff_celt_imdct_init(CeltIMDCTContext **ps, int N)
     s->len4 = len2 / 2;
     s->len2 = len2;
 
-    s->tmp  = av_malloc(len * 2 * sizeof(*s->tmp));
+    s->tmp  = av_malloc_array(len, 2 * sizeof(*s->tmp));
     if (!s->tmp)
         goto fail;
 
-    s->twiddle_exptab  = av_malloc(s->len4 * sizeof(*s->twiddle_exptab));
+    s->twiddle_exptab  = av_malloc_array(s->len4, sizeof(*s->twiddle_exptab));
     if (!s->twiddle_exptab)
         goto fail;
 



More information about the ffmpeg-cvslog mailing list