[FFmpeg-cvslog] kgv1dec: fix end condition

Michael Niedermayer git at videolan.org
Wed Nov 7 01:52:07 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov  7 01:42:11 2012 +0100| [de0aa9e5a4e65c18397880d04de6ff6b8deb8a14] | committer: Michael Niedermayer

kgv1dec: fix end condition

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de0aa9e5a4e65c18397880d04de6ff6b8deb8a14
---

 libavcodec/kgv1dec.c |    2 +-
 tests/ref/fate/kgv1  |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index 6552dc5..6c1daa9 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -83,7 +83,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     for (i = 0; i < 8; i++)
         offsets[i] = -1;
 
-    while (outcnt < maxcnt && buf_end - 2 > buf) {
+    while (outcnt < maxcnt && buf_end - 2 >= buf) {
         int code = AV_RL16(buf);
         buf += 2;
 
diff --git a/tests/ref/fate/kgv1 b/tests/ref/fate/kgv1
index 6f35893..4f475bb 100644
--- a/tests/ref/fate/kgv1
+++ b/tests/ref/fate/kgv1
@@ -294,15 +294,15 @@
 0,        292,        292,        1,   153600, 0x1348310e
 0,        293,        293,        1,   153600, 0xb5489dad
 0,        294,        294,        1,   153600, 0xa1eb1408
-0,        295,        295,        1,   153600, 0x15e1832c
+0,        295,        295,        1,   153600, 0x15e0832b
 0,        296,        296,        1,   153600, 0xb789cba5
 0,        297,        297,        1,   153600, 0x3ee86e4f
 0,        298,        298,        1,   153600, 0x06ea3883
 0,        299,        299,        1,   153600, 0xcedd02b7
-0,        300,        300,        1,   153600, 0xbce6ce58
-0,        301,        301,        1,   153600, 0xaadf9a00
+0,        300,        300,        1,   153600, 0xbcd6ce50
+0,        301,        301,        1,   153600, 0xaacf99f8
 0,        302,        302,        1,   153600, 0x98c865a0
-0,        303,        303,        1,   153600, 0x4c8432e0
+0,        303,        303,        1,   153600, 0x4c6432d0
 0,        304,        304,        1,   153600, 0x00000000
 0,        305,        305,        1,   153600, 0x00000000
 0,        306,        306,        1,   153600, 0x00000000



More information about the ffmpeg-cvslog mailing list