]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
SVQ3: Fix decoding with A32_BITSTREAM_READER
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 12:11:07 +0000 (12:11 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 12:11:07 +0000 (12:11 +0000)
svq3_decode_slice_header() modifies the buffer used by the bitstream
reader.  Some of the bitstream readers cache a few bytes of data, which
must be flushed after such a modification.  Calling skip_bits_long(gb, 0)
achieves this.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17680 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/svq3.c

index 6dc37abb71e1614b60658f2f8768d2973a1c7ea4..bef7075a2626e273f18bd6ddd90142b1cbff2e57 100644 (file)
@@ -724,6 +724,7 @@ static int svq3_decode_slice_header(H264Context *h)
             memcpy((uint8_t *) &s->gb.buffer[get_bits_count(&s->gb) >> 3],
                    &s->gb.buffer[s->gb.size_in_bits >> 3], (length - 1));
         }
+        skip_bits_long(&s->gb, 0);
     }
 
     if ((i = svq3_get_ue_golomb(&s->gb)) == INVALID_VLC || i >= 3){