From: Jean First <[email protected]>

Signed-off-by: Justin Ruggles <[email protected]>
---
 libavcodec/tiff.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 735eafe..e520e95 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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;
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to