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

Michael Niedermayer git at videolan.org
Fri Apr 25 15:12:52 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 25 15:07:31 2014 +0200| [92cc6d5163cd43a1a909dcc63787292f33e5d6ed] | committer: Michael Niedermayer

avcodec/mdct_template: Use av_malloc_array()

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

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

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

diff --git a/libavcodec/mdct_template.c b/libavcodec/mdct_template.c
index a66ac4c..7fa8bcc 100644
--- a/libavcodec/mdct_template.c
+++ b/libavcodec/mdct_template.c
@@ -60,7 +60,7 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
     if (ff_fft_init(s, s->mdct_bits - 2, inverse) < 0)
         goto fail;
 
-    s->tcos = av_malloc(n/2 * sizeof(FFTSample));
+    s->tcos = av_malloc_array(n/2, sizeof(FFTSample));
     if (!s->tcos)
         goto fail;
 



More information about the ffmpeg-cvslog mailing list