avfilter/vf_owdenoise: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Jul 2014 01:18:56 +0000 (03:18 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Jul 2014 01:18:56 +0000 (03:18 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_owdenoise.c

index 95ba43b..5b47f76 100644 (file)
@@ -293,7 +293,7 @@ static int config_input(AVFilterLink *inlink)
     s->linesize = FFALIGN(inlink->w, 16);
     for (j = 0; j < 4; j++) {
         for (i = 0; i <= s->depth; i++) {
-            s->plane[i][j] = av_malloc(s->linesize * h * sizeof(s->plane[0][0][0]));
+            s->plane[i][j] = av_malloc_array(s->linesize, h * sizeof(s->plane[0][0][0]));
             if (!s->plane[i][j])
                 return AVERROR(ENOMEM);
         }