david - 2013-06-06

Hello.

(Mpeg1-2 Splitter)

bool CBaseSplitterFileEx::Read(pssyshdr& h){

    memset(&h, 0, sizeof(h));

    WORD len = (WORD)BitRead(16); MARKER;
    h.rate_bound = (DWORD)BitRead(22); MARKER;
    h.audio_bound = (BYTE)BitRead(6);
    h.fixed_rate = !!BitRead(1);
    h.csps = !!BitRead(1);
    h.sys_audio_loc_flag = !!BitRead(1);
    h.sys_video_loc_flag = !!BitRead(1); MARKER;
    h.video_bound = (BYTE)BitRead(5);
    EXECUTE_ASSERT((BitRead(8)&0x7f) == 0x7f); // reserved (should be 0xff, but not in reality)

    for(len -= 6; len > 3; len -= 3) // TODO: also store these, somewhere, if needed
    {
            UINT64 stream_id = BitRead(8);
            EXECUTE_ASSERT(BitRead(2) == 3);
            UINT64 p_std_buff_size_bound = (BitRead(1)?1024:128)*BitRead(13);
    }

    return(true);

}


Should be

for(len -= 6; len >= 3; len -= 3)...

 
Last edit: david 2013-06-06