]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_unsharp.c
Merge commit 'f23d26a6864128001b03876b0b92fffe131f2060'
[ffmpeg] / libavfilter / vf_unsharp.c
index b9f6821b038f5626cf737edc8b100d9c86554735..37053d98e064fac15a857090c05a730e482c2659 100644 (file)
@@ -184,7 +184,8 @@ static int init_filter_param(AVFilterContext *ctx, UnsharpFilterParam *fp, const
            effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
 
     for (z = 0; z < 2 * fp->steps_y; z++)
-        if (!(fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x))))
+        if (!(fp->sc[z] = av_malloc_array(width + 2 * fp->steps_x,
+                                          sizeof(*(fp->sc[z])))))
             return AVERROR(ENOMEM);
 
     return 0;