mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
add developer tool for finding jumps in timestamps in output of mkvinfo -s…
This commit is contained in:
parent
3607e98e9a
commit
836ce42b73
23
tools/development/find_timestamp_jumps_in_mkvinfo_s.pl
Executable file
23
tools/development/find_timestamp_jumps_in_mkvinfo_s.pl
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
|
||||
my ($prev_ts, $prev_line) = (0, '');
|
||||
my $line_no = 0;
|
||||
|
||||
while (<>) {
|
||||
$line_no++;
|
||||
chomp;
|
||||
|
||||
if (m{timestamp (\d+):(\d+):(\d+)\.(\d+)}) {
|
||||
my $curr_ts = $4 + ($3 + $2 * 60 + $1 * 3_600) * 1_000_000_000;
|
||||
|
||||
if (($curr_ts - $prev_ts) > 10_000_000_000) {
|
||||
print "--- jump in line $line_no\n$prev_line\n$_\n";
|
||||
}
|
||||
|
||||
$prev_ts = $curr_ts;
|
||||
}
|
||||
|
||||
$prev_line = $_;
|
||||
}
|
Loading…
Reference in New Issue
Block a user