add developer tool for finding jumps in timestamps in output of mkvinfo -s…

This commit is contained in:
Moritz Bunkus 2020-06-21 16:12:42 +02:00
parent 3607e98e9a
commit 836ce42b73
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View 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 = $_;
}