]> git.sesse.net Git - ffmpeg/commitdiff
swresample/dither: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 7 Apr 2014 22:29:06 +0000 (00:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 7 Apr 2014 22:29:20 +0000 (00:29 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/dither.c

index 7cbe410557d63a3f1999f0c8a295252a41d3260f..b8b592a7ce9f91065bfd547cecc5a5d68081ed5b 100644 (file)
@@ -26,7 +26,7 @@
 void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) {
     double scale = s->dither.noise_scale;
 #define TMP_EXTRA 2
-    double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double));
+    double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double));
     int i;
 
     for(i=0; i<len + TMP_EXTRA; i++){