swresample/x86/rematrix_init: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 9 Feb 2015 09:05:30 +0000 (10:05 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 9 Feb 2015 09:15:56 +0000 (10:15 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/x86/rematrix_init.c

index e2ee291..bf69574 100644 (file)
@@ -50,7 +50,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
             s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2;
             s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;
         }
-        s->native_simd_matrix = av_mallocz(2 * num * sizeof(int16_t));
+        s->native_simd_matrix = av_mallocz_array(num,  2 * sizeof(int16_t));
         s->native_simd_one    = av_mallocz(2 * sizeof(int16_t));
         for(i=0; i<nb_out; i++){
             int sh = 0;
@@ -74,7 +74,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
             s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
             s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
         }
-        s->native_simd_matrix = av_mallocz(num * sizeof(float));
+        s->native_simd_matrix = av_mallocz_array(num, sizeof(float));
         memcpy(s->native_simd_matrix, s->native_matrix, num * sizeof(float));
         s->native_simd_one = av_mallocz(sizeof(float));
         memcpy(s->native_simd_one, s->native_one, sizeof(float));