avcodec/mdct_template: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 25 Apr 2014 13:07:31 +0000 (15:07 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 25 Apr 2014 13:07:31 +0000 (15:07 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mdct_template.c

index a66ac4c..7fa8bcc 100644 (file)
@@ -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;