From 535eed93018fd73400d16892e289e89cbfe765bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 24 Mar 2012 23:01:37 +0100 Subject: vqavideo: fix decoding of samples with no partial updates. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes playback of http://samples.mplayerhq.hu/game-formats/vqa/landsoflore/B0EB8711.VQA (trac issue #710). Signed-off-by: Reimar Döffinger --- libavcodec/vqavideo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/vqavideo.c') diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index 5c864c2..ebdc17e 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -544,7 +544,7 @@ static int vqa_decode_chunk(VqaContext *s) s->next_codebook_buffer_index += chunk_size; s->partial_countdown--; - if (s->partial_countdown == 0) { + if (s->partial_countdown <= 0) { /* time to replace codebook */ memcpy(s->codebook, s->next_codebook_buffer, @@ -567,7 +567,7 @@ static int vqa_decode_chunk(VqaContext *s) s->next_codebook_buffer_index += chunk_size; s->partial_countdown--; - if (s->partial_countdown == 0) { + if (s->partial_countdown <= 0) { GetByteContext gb; bytestream2_init(&gb, s->next_codebook_buffer, s->next_codebook_buffer_index); -- cgit v1.1