[FFmpeg-cvslog] avfilter/vsrc_cellauto: Use av_mallocz_array()

Michael Niedermayer git at videolan.org
Sun Jul 6 14:39:44 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul  6 14:35:13 2014 +0200| [e592bf3d2ff7280188d32ce1699b074917600e6d] | committer: Michael Niedermayer

avfilter/vsrc_cellauto: Use av_mallocz_array()

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

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

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

diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c
index 95eabc1..5e2df2d 100644
--- a/libavfilter/vsrc_cellauto.c
+++ b/libavfilter/vsrc_cellauto.c
@@ -122,7 +122,7 @@ static int init_pattern_from_string(AVFilterContext *ctx)
         cellauto->h = (double)cellauto->w * M_PHI;
     }
 
-    cellauto->buf = av_mallocz(sizeof(uint8_t) * cellauto->w * cellauto->h);
+    cellauto->buf = av_mallocz_array(sizeof(uint8_t) * cellauto->w, cellauto->h);
     if (!cellauto->buf)
         return AVERROR(ENOMEM);
 
@@ -182,7 +182,7 @@ static av_cold int init(AVFilterContext *ctx)
         /* fill the first row randomly */
         int i;
 
-        cellauto->buf = av_mallocz(sizeof(uint8_t) * cellauto->w * cellauto->h);
+        cellauto->buf = av_mallocz_array(sizeof(uint8_t) * cellauto->w, cellauto->h);
         if (!cellauto->buf)
             return AVERROR(ENOMEM);
         if (cellauto->random_seed == -1)



More information about the ffmpeg-cvslog mailing list