Package: cdrdao
Version: 1:1.2.2-6
Severity: important
Tags: patch

I usually write TOC-files by hand and, since I don't want to find out
how long each file is, normally use lines like these in the TOC-files:
-- 8< --
 PREGAP 00:02:00
 AUDIOFILE "01.wav" 0
-- >8 --
According to the manpage, cdrdao should find out how long the file is
and use it from the <start> (here `0') to the end of the file:
-- 8< --
 The first sample of an audio file is addressed with <start> = 0. If
 <length> is omitted or set to 0 all audio data from <start> until the
 end of file is used.
-- >8 --

However, every command that tries to read the TOC-file failes with an
error message like this one:
-- 8< --
 ERROR: audio.toc:136: START 00:02:00 behind or at track end.
-- >8 --

The problem is that the code that reads the track length has been
removed in revision 1.10 of file `trackdb/TocParser.g', commited on May
1st, 2005. If the tags in the CVS are correct, then the first version
with the problem has been 1.2.0.
<http://cdrdao.cvs.sourceforge.net/cdrdao/cdrdao/trackdb/TocParser.g?r1=1.9&r2=1.10>

The attached patch undoes the harmful part of the commit, so that cdrdao
behaves as described in the manpage again.

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
diff -pur a/trackdb/TocParser.g b/trackdb/TocParser.g
--- a/trackdb/TocParser.g	2007-09-01 13:09:43.000000000 +0200
+++ b/trackdb/TocParser.g	2007-09-01 13:10:03.000000000 +0200
@@ -496,6 +496,15 @@ subTrack < [ TrackData::Mode trackType, 
 	  }
        >>
     )
+    << if ($st != NULL && $st->length() == 0) {
+         // try to determine length 
+         if ($st->determineLength() != 0) {
+	   message(-2, "%s:%d: Cannot determine length of track data specification.",
+		   filename_, $lineNr);
+	   error_ = 1;
+	 }
+       }
+    >> 
     ;
     // fail action
     << delete $st, $st = NULL;

Attachment: signature.asc
Description: Digital signature

Reply via email to