From ccf7c641165dfed1082b7bcbe73b82adf29d62be Mon Sep 17 00:00:00 2001 From: thor Date: Sun, 28 Jun 2015 12:49:45 +0000 Subject: [PATCH] conplay: rewind to the beginning and correct check to accept last track git-svn-id: svn://scm.orgis.org/mpg123/trunk@3675 35dc7657-300d-0410-a2e5-dc2837fedb53 --- scripts/conplay | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/conplay b/scripts/conplay index fc0cf976..eff2a1da 100755 --- a/scripts/conplay +++ b/scripts/conplay @@ -69,7 +69,7 @@ unless(@files) exit; } -if($entry < 0 or $entry > $#files or $frame < 0) +if($entry < 0 or $entry > @files or $frame < 0) { die "You got bad data in your playlist file (mismatch between current entry and total count, bad frame index). Clean that up.\n"; } @@ -95,6 +95,11 @@ while() } close(MPG123); +if($entry > @files) +{ + $entry = 0; + $frame = 0; +} print STDERR "Continue point is in track $entry, frame $frame.\n"; write_list();