We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

  • Matej's avatar
    h264parser: not all startcodes should have 3-byte 0 prefix · 6af387cd
    Matej authored
    The parser assumes that every time there is a 0 before the startcode,
    it is part of the startcode. But that's not true.
    From the specification
    Byte stream NAL unit syntax
    zero_byte is a single byte equal to 0x00.
      When any of the following conditions are fulfilled, the zero_byte syntax
      element shall be present.
      – the nal_unit_type within the nal_unit( ) is equal to 7 (sequence parameter
        set) or 8 (picture parameter set)
      – the byte stream NAL unit syntax structure contains the first NAL unit of an
        access unit in decoding order, as specified by subclause
    The problem with doing this for all startcodes is that a trailing zero can mess
    up timestamps. The trailing zero gets prepended to the startcode, which will
    carry the PTS and DTS of previous buffer.
gsth264parser.c 59.7 KB