[FFmpeg-cvslog] avfilter/f_ebur128: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Jul 1 04:42:29 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul  1 03:50:53 2014 +0200| [a97137e9486964918a71f1a760cdcc297bf61b59] | committer: Michael Niedermayer

avfilter/f_ebur128: Use av_malloc_array()

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

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

 libavfilter/f_ebur128.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 2e510db..a02cf28 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -412,7 +412,7 @@ static int config_audio_output(AVFilterLink *outlink)
     if (ebur128->peak_mode & PEAK_MODE_TRUE_PEAKS) {
         int ret;
 
-        ebur128->swr_buf    = av_malloc(19200 * nb_channels * sizeof(double));
+        ebur128->swr_buf    = av_malloc_array(nb_channels, 19200 * sizeof(double));
         ebur128->true_peaks = av_calloc(nb_channels, sizeof(*ebur128->true_peaks));
         ebur128->true_peaks_per_frame = av_calloc(nb_channels, sizeof(*ebur128->true_peaks_per_frame));
         ebur128->swr_ctx    = swr_alloc();



More information about the ffmpeg-cvslog mailing list