mkvtoolnix/tests/test-490sequence_numbers_no_0_in_first_gop.rb
Moritz Bunkus 8696db7e11 MPEG-2 parser: re-write timestamping code not to rely on exact sequence number progression
The old code was calculating an expected sequence number. As soon as
that sequence number was matched with frames, all previous frames would
be timestamped.

This method is problematic if the actual sequence numbers don't follow
the expected progression.

The new code is much simpler. As soon as an I frame is encountered (or
at the end of the file) the queued frames are first sorted by their
sequence number, then timestamped, and lastly sorted back into their
decoding order.

This fixes #1162 and most likely others (see #1145, #1099 et. al.).
2015-04-11 14:33:45 +02:00

6 lines
206 B
Ruby
Executable File

#!/usr/bin/ruby -w
# T_490sequence_numbers_no_0_in_first_gop
describe "mkvmerge / MPEG-2 ES without a sequence number == 0 in the first GOP"
test_merge "data/mpeg12/sequence_numbers_no_0_in_first_gop.m2v"