[FFmpeg-cvslog] vcodec/error_resilience: use av_malloc_array()

Michael Niedermayer git at videolan.org
Sat Apr 12 15:46:47 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 12 15:33:55 2014 +0200| [36053aeff651ccf11b9a15dcbe61aaa1317135ac] | committer: Michael Niedermayer

vcodec/error_resilience: use av_malloc_array()

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

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

 libavcodec/error_resilience.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 5410dc1..670e592 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -136,8 +136,8 @@ static void guess_dc(ERContext *s, int16_t *dc, int w,
                      int h, int stride, int is_luma)
 {
     int b_x, b_y;
-    int16_t  (*col )[4] = av_malloc(stride*h*sizeof( int16_t)*4);
-    uint32_t (*dist)[4] = av_malloc(stride*h*sizeof(uint32_t)*4);
+    int16_t  (*col )[4] = av_malloc_array(stride, h*sizeof( int16_t)*4);
+    uint32_t (*dist)[4] = av_malloc_array(stride, h*sizeof(uint32_t)*4);
 
     if(!col || !dist) {
         av_log(s->avctx, AV_LOG_ERROR, "guess_dc() is out of memory\n");



More information about the ffmpeg-cvslog mailing list