Skip to content
  • Stefan Pöschel's avatar
    Fix MPEG-2 TS magic · bd2a8c0f
    Stefan Pöschel authored and Bastien Nocera's avatar Bastien Nocera committed
    The MPEG-2 TS magic made assumptions which do not hold for the first
    packet of every MPEG-2 TS, e.g. that the Continuity Counter is 0 or
    the Payload Unit Start Indicator is set.
    
    This alternative approach exploits the fixed packet size of 188 bytes
    (192 bytes with BDAV MPEG-2 TS) and checks the first five packets for
    the Sync Byte 0x47.
    The used offsets partly seem to be a bit high in contrast to other
    formats, but MPEG-2 TS files are usually much bigger than that.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=51118
    bd2a8c0f