Commit Graph

1 Commits

Author SHA1 Message Date
Moritz Bunkus
e1b27818e9 MPEG TS reader: require more consecutive packets, ignore h.264/h.265 start codes
In an earlier commit I introduced a workaround for h.264/h.265 files
being mis-detected as MPEG transport streams. That workaround was used
when the first bytes in a file were a valid h.264/h.265 start code.

Unfortunately this prevents the detection of valid MPEG transport
streams if they do indeed contain such a start code.

The fix is to remove the aforementioned workaround. Instead mkvmerge
now requires 333 KB of consecutive MPEG transport stream headers
inside the first 1 MB of the file, which amounts to ~1680 consecutive
headers. This reliably prevents the mis-detection as h.264/h.265 and
still allows for detection of real transport streams even if they
start with a h.264/h.265 start code.
2017-05-10 16:30:57 +02:00