avutil/audio_fifo: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 5 May 2014 16:59:56 +0000 (18:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 5 May 2014 16:59:56 +0000 (18:59 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/audio_fifo.c

index cfbde89..c3aadfd 100644 (file)
@@ -76,7 +76,7 @@ AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
     af->sample_size = buf_size / nb_samples;
     af->nb_buffers  = av_sample_fmt_is_planar(sample_fmt) ? channels : 1;
 
-    af->buf = av_mallocz(af->nb_buffers * sizeof(*af->buf));
+    af->buf = av_mallocz_array(af->nb_buffers, sizeof(*af->buf));
     if (!af->buf)
         goto error;