[paranoia-dev] Patch for FixupTOC
goodbyte at phreaker.net
goodbyte at phreaker.net
Wed Nov 6 14:21:21 PST 2002
Hi
I think I've found a bug (or maybe incompatibility with my cd-drive.) I
tried ripping a cd of mine with a pre-track, and cdparanoia just went
nuts. It seemed cdparanoia thought the last track had a negative number
of sectors, which made it impossible to get anything from the cd except
a part of the pre-track. I tracked down the bug to the multi-session
fix in FixupTOC, and I've attach my patch. I don't say this is the Right
Way to do it (haven't tested against a multi-session cd), but I don't
think it will cause any incompabilities.
Otherwice it's a GREAT TOOL. Thanx
--
Erik Månsson
Zapp: Now that's a wave of destruction that's easy on the eyes.
-------------- next part --------------
diff -urN cdparanoia-III-alpha9.8/interface/common_interface.c cdparanoia-III-alpha9.8.new/interface/common_interface.c
--- cdparanoia-III-alpha9.8/interface/common_interface.c 2000-04-20 00:40:42.000000000 +0200
+++ cdparanoia-III-alpha9.8.new/interface/common_interface.c 2002-11-06 23:06:03.000000000 +0100
@@ -223,7 +223,8 @@
/* adjust end of last audio track to be in the first session */
for (j = tracks-1; j >= 0; j--) {
if (j > 0 && !IS_AUDIO(d,j) && IS_AUDIO(d,j-1)) {
- if (d->disc_toc[j].dwStartSector > ms_str.addr.lba - 11400)
+ if ((d->disc_toc[j].dwStartSector > ms_str.addr.lba - 11400) &&
+ (ms_str.addr.lba - 11400 > d->disc_toc[j-1].dwStartSector))
d->disc_toc[j].dwStartSector = ms_str.addr.lba - 11400;
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/paranoia-dev/attachments/20021106/d7f44ca3/part.pgp
More information about the Paranoia-dev
mailing list