swresample/resample: use av_malloc_array() where appropriate
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 7 Apr 2014 22:29:26 +0000 (00:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jun 2014 13:10:07 +0000 (15:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5027f39712fdce25b9008e72d52e5abfeefd5fe6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/resample.c

index b968447..65fd817 100644 (file)
@@ -95,7 +95,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
                         int filter_type, int kaiser_beta){
     int ph, i;
     double x, y, w;
-    double *tab = av_malloc(tap_count * sizeof(*tab));
+    double *tab = av_malloc_array(tap_count,  sizeof(*tab));
     const int center= (tap_count-1)/2;
 
     if (!tab)