avutil/audio_fifo: Use av_mallocz_array()
[ffmpeg.git] / libavutil / audio_fifo.c
index cfbde899235256f88bec4ddb6611ed8a8a6673a6..c3aadfdab70a650f14204a4c34d77b0080d9dfc3 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;