ffplay: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 25 Aug 2014 16:32:53 +0000 (18:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 25 Aug 2014 22:41:09 +0000 (00:41 +0200)
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffplay.c

index e66dea1..833b5b1 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -991,7 +991,7 @@ static void video_audio_display(VideoState *s)
             av_free(s->rdft_data);
             s->rdft = av_rdft_init(rdft_bits, DFT_R2C);
             s->rdft_bits = rdft_bits;
-            s->rdft_data = av_malloc(4 * nb_freq * sizeof(*s->rdft_data));
+            s->rdft_data = av_malloc_array(nb_freq, 4 *sizeof(*s->rdft_data));
         }
         {
             FFTSample *data[2];