Browse Source

kgv1dec: fix end condition

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
de0aa9e5a4
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      libavcodec/kgv1dec.c
  2. +4
    -4
      tests/ref/fate/kgv1

+ 1
- 1
libavcodec/kgv1dec.c View File

@@ -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;



+ 4
- 4
tests/ref/fate/kgv1 View File

@@ -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


Loading…
Cancel
Save