[FFmpeg-cvslog] ffplay: use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Aug 26 01:20:38 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 25 18:32:53 2014 +0200| [e96109f93ce90908d5be44b31c152e3be36f184c] | committer: Michael Niedermayer

ffplay: use av_malloc_array()

Reviewed-by: Marton Balint <cus at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffplay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index e66dea1..833b5b1 100644
--- 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];



More information about the ffmpeg-cvslog mailing list