]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_edgedetect: fix coverity issue
authorPaul B Mahol <onemda@gmail.com>
Mon, 14 Oct 2019 08:52:27 +0000 (10:52 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 14 Oct 2019 08:52:27 +0000 (10:52 +0200)
libavfilter/vf_edgedetect.c

index 11a31fa4ff9e0e6cbe8c40c87c9bc0920905371f..ea0efe0de3de75b708a81cbec1b9bdf6de9d8527 100644 (file)
@@ -150,8 +150,9 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
     int i, j;
 
     memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
-    if (h > 1)
+    if (h > 1) {
         memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
+    }
     for (j = 2; j < h - 2; j++) {
         dst[0] = src[0];
         dst[1] = src[1];
@@ -181,8 +182,9 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
         dst += dst_linesize;
         src += src_linesize;
     }
-    if (h > 2)
+    if (h > 2) {
         memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
+    }
     if (h > 3)
         memcpy(dst, src, w);
 }