[FFmpeg-cvslog] swresample/x86/rematrix_init: Use av_mallocz_array()

Michael Niedermayer git at videolan.org
Mon Feb 9 12:01:07 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Feb  9 10:05:30 2015 +0100| [48ffaaaaef98640782cfdaaf21319a83292b62b2] | committer: Michael Niedermayer

swresample/x86/rematrix_init: Use av_mallocz_array()

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

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

 libswresample/x86/rematrix_init.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswresample/x86/rematrix_init.c b/libswresample/x86/rematrix_init.c
index e2ee291..bf69574 100644
--- a/libswresample/x86/rematrix_init.c
+++ b/libswresample/x86/rematrix_init.c
@@ -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));



More information about the ffmpeg-cvslog mailing list