tiffdec: rename variables for consistency and fix variable shadowing
authorJean First <jeanfirst@gmail.com>
Fri, 23 Sep 2011 06:22:31 +0000 (08:22 +0200)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 12 Apr 2014 18:49:07 +0000 (14:49 -0400)
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
libavcodec/tiff.c

index 7fb0e7a..9f8bc60 100644 (file)
@@ -665,14 +665,11 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     if (s->invert) {
-        uint8_t *src;
-        int j;
-
-        src = p->data[0];
-        for (j = 0; j < s->height; j++) {
-            for (i = 0; i < p->linesize[0]; i++)
-                src[i] = 255 - src[i];
-            src += p->linesize[0];
+        dst = p->data[0];
+        for (i = 0; i < s->height; i++) {
+            for (j = 0; j < p->linesize[0]; j++)
+                dst[j] = 255 - dst[j];
+            dst += stride;
         }
     }
     *got_frame = 1;