]> git.sesse.net Git - vlc/commit
ts: fix demuxing of BluRay streams.
authorPetri Hintukainen <phintuka@gmail.com>
Tue, 4 Feb 2014 21:37:16 +0000 (21:37 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Feb 2014 14:23:29 +0000 (15:23 +0100)
commitfd161f46cf211f1afd887ac2aafeaa7bdfe76faf
tree0102cc5f42268ac334b58c17237140ab02027f65
parent18305c12b6469c82fd84560f3935389662bc0475
ts: fix demuxing of BluRay streams.

BluRay streams have 4-byte header before TS sync byte. Current code handles 192-byte ts packets,
but it assumes extra bytes are at the end of packet. This results in re-sync at stream start:
  1) first packet is dropped
     First packet is usually PAT, and losing it means losing the first GOP.
     This is fatal with still-image based menus.
  2) 4-byte header of the second packet is skipped
     This results in read of the last packet returning only 188 bytes,
     and it is also skipped.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/ts.c