vqavideo: Reinitialise the actually used partial codebook bytestream-reader.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 22 Nov 2012 21:28:17 +0000 (22:28 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 10 Dec 2012 00:09:08 +0000 (01:09 +0100)
Fixes ticket #1942.
(cherry picked from commit dd6abc921af19100c4ace5ff72dee5f92c0e6ac0)

libavcodec/vqavideo.c

index e4bad00..c814837 100644 (file)
@@ -566,9 +566,7 @@ static int vqa_decode_chunk(VqaContext *s)
 
         s->partial_countdown--;
         if (s->partial_countdown <= 0) {
-            GetByteContext gb;
-
-            bytestream2_init(&gb, s->next_codebook_buffer, s->next_codebook_buffer_index);
+            bytestream2_init(&s->gb, s->next_codebook_buffer, s->next_codebook_buffer_index);
             /* decompress codebook */
             if ((res = decode_format80(s, s->next_codebook_buffer_index,
                                        s->codebook, s->codebook_size, 0)) < 0)