[FFmpeg-cvslog] swresample/dither: use av_malloc_array()

Michael Niedermayer git at videolan.org
Thu Apr 10 05:08:41 CEST 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 00:29:06 2014 +0200| [d20ac551a8617533279b8b301f2749e8e5890848] | committer: Michael Niedermayer

swresample/dither: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit a5290cb1ac047851563da7aca06569e3ada55f79)

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

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

 libswresample/dither.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswresample/dither.c b/libswresample/dither.c
index 7cbe410..b8b592a 100644
--- a/libswresample/dither.c
+++ b/libswresample/dither.c
@@ -26,7 +26,7 @@
 void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) {
     double scale = s->dither.noise_scale;
 #define TMP_EXTRA 2
-    double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double));
+    double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double));
     int i;
 
     for(i=0; i<len + TMP_EXTRA; i++){



More information about the ffmpeg-cvslog mailing list