mkvtoolnix/tests/test-597mpeg_ts_starting_with_avc_start_code.rb
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

6 lines
220 B
Ruby
Executable File

#!/usr/bin/ruby -w
# T_597mpeg_ts_starting_with_avc_start_code
describe "mkvmerge / MPEG TS starting with an h.264/h.265 start code not identified at all"
test_identify "data/ts/mpeg_ts_starting_with_avc_start_code.ts"