[FFmpeg-cvslog] avcodec/flacenc: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Wed Apr 30 20:02:39 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 30 18:28:40 2014 +0200| [0eb9482e322662c834b26c1f39abe1f8b652dc73] | committer: Michael Niedermayer

avcodec/flacenc: Use av_malloc_array()

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

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

 libavcodec/flacenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 1fc8c4c..b6ae4af 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -649,7 +649,7 @@ static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
 
     tmp_rc.coding_mode = rc->coding_mode;
 
-    udata = av_malloc(n * sizeof(uint32_t));
+    udata = av_malloc_array(n,  sizeof(uint32_t));
     for (i = 0; i < n; i++)
         udata[i] = (2*data[i]) ^ (data[i]>>31);
 



More information about the ffmpeg-cvslog mailing list