Ignore:
Timestamp:
12/14/07 00:22:01 (16 years ago)
Author:
radscorpion
Message:

MPC Demux works. Right now it can only be used with Dump filter, because
it accepts any mediatype.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dsfilters/demux_mpc/src/bits.cpp

    r367 r368  
    115115int32 Bitstream::Get_Golomb(int k)
    116116{
    117         int32 len = 0;
    118         NeedBits24();
    119         while (UGetBits(1) == 1) len++;
    120         if (len == 0) return 0;
    121         NeedBits24();
    122 
    123         //while (bits
    124 
    125         int32 val = (1 << len) | UGetBits(len);
    126     return val;
     117        int32 l=0;
     118        NeedBits();
     119        while (UBits(8) == 0) {
     120                l += 8;
     121                DumpBits(8);
     122                NeedBits();     
     123        }
     124        while (UGetBits(1) == 0) l++;
     125        NeedBits();
     126        return (l << k) | UGetBits(k);
    127127}
    128128
Note: See TracChangeset for help on using the changeset viewer.