]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_deband: do not use uninitialized value
authorPaul B Mahol <onemda@gmail.com>
Fri, 23 Dec 2016 17:53:20 +0000 (18:53 +0100)
committerPaul B Mahol <onemda@gmail.com>
Fri, 23 Dec 2016 17:53:20 +0000 (18:53 +0100)
Fixes coverity report.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_deband.c

index ffec037fd4b6995f1f700a14f304f8d05438dfe9..713e80b04935dcc19a16c85d09555b484e25faf6 100644 (file)
@@ -192,7 +192,7 @@ static int deband_8_coupling_c(AVFilterContext *ctx, void *arg, int jobnr, int n
     for (y = start; y < end; y++) {
         const int pos = y * s->planewidth[0];
 
-        for (x = 0; x < s->planewidth[p]; x++) {
+        for (x = 0; x < s->planewidth[0]; x++) {
             const int x_pos = s->x_pos[pos + x];
             const int y_pos = s->y_pos[pos + x];
             int avg[4], cmp[4] = { 0 }, src[4];
@@ -257,7 +257,7 @@ static int deband_16_coupling_c(AVFilterContext *ctx, void *arg, int jobnr, int
     for (y = start; y < end; y++) {
         const int pos = y * s->planewidth[0];
 
-        for (x = 0; x < s->planewidth[p]; x++) {
+        for (x = 0; x < s->planewidth[0]; x++) {
             const int x_pos = s->x_pos[pos + x];
             const int y_pos = s->y_pos[pos + x];
             int avg[4], cmp[4] = { 0 }, src[4];