[libav-commits] 4xm: fix calculation of the next output line position in decode_i2_frame().

Aneesh Dogra git at libav.org
Thu Jan 5 06:16:10 CET 2012


Module: libav
Branch: master
Commit: 893f1376793e67e4be76d074d51313e59805bd40

Author:    Aneesh Dogra <lionaneesh at gmail.com>
Committer: Ronald S. Bultje <rsbultje at gmail.com>
Date:      Thu Jan  5 01:00:26 2012 +0530

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 at gmail.com>

---

 libavcodec/4xm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 83f0a12..7cda26e 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;



More information about the libav-commits mailing list