summaryrefslogtreecommitdiff
path: root/Tools/schnitt/getpreviframe.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/schnitt/getpreviframe.pl')
-rwxr-xr-xTools/schnitt/getpreviframe.pl31
1 files changed, 31 insertions, 0 deletions
diff --git a/Tools/schnitt/getpreviframe.pl b/Tools/schnitt/getpreviframe.pl
new file mode 100755
index 0000000..6774f31
--- /dev/null
+++ b/Tools/schnitt/getpreviframe.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+use strict;
+
+my ($index, $oindex);
+
+require "/usr/local/bin/my/schnittcommon.pli";
+
+if (!open (INDEX,"index.vdr"))
+ {
+ exit 1;
+ }
+
+$index = $oindex = $ARGV[0];
+
+if ($index > 0)
+{
+ &prevI;
+ if ($oindex != $index)
+ {
+ print "$index\n";
+ }
+ else
+ {
+ print "$oindex\n";
+ }
+}
+else
+{
+ print "0\n";
+}