From 893f1376793e67e4be76d074d51313e59805bd40 Mon Sep 17 00:00:00 2001
From: Aneesh Dogra <lionaneesh@gmail.com>
Date: Thu, 5 Jan 2012 00:42:26 +0530
Subject: [PATCH] 4xm: fix calculation of the next output line position in
 decode_i2_frame().

The current code doesn't work unless width is an exact multiple of 16.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
---
 libavcodec/4xm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 83f0a12f1ca..7cda26ed30a 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -640,7 +640,7 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){
             }
             dst+=16;
         }
-        dst += 16*stride - width;
+        dst += 16 * stride - x;
     }
 
     return 0;
-- 
GitLab