vl/mpeg12: use new vlc function to search for start codes
authorChristian König <christian.koenig@amd.com>
Mon, 9 Sep 2013 09:57:58 +0000 (03:57 -0600)
committerChristian König <christian.koenig@amd.com>
Wed, 25 Sep 2013 08:58:58 +0000 (10:58 +0200)
Signed-off-by: Christian König <christian.koenig@amd.com>
src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c

index cfa5eab94d61de2faa467fda3257dd37d4226016..b03ad071a5e1214936059f91ba72aa3cda78ad31 100644 (file)
@@ -995,7 +995,7 @@ vl_mpg12_bs_decode(struct vl_mpg12_bs *bs,
    bs->intra_dct_tbl = picture->intra_vlc_format ? tbl_B15 : tbl_B14_AC;
 
    vl_vlc_init(&bs->vlc, num_buffers, buffers, sizes);
-   while (vl_vlc_bits_left(&bs->vlc) > 32) {
+   while (vl_vlc_search_byte(&bs->vlc, ~0, 0x00) && vl_vlc_bits_left(&bs->vlc) > 32) {
       uint32_t code = vl_vlc_peekbits(&bs->vlc, 32);
 
       if (code >= 0x101 && code <= 0x1AF) {