Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2008 18:18:14 +1000 (EST)
From:      Fraser Tweedale <frase@frase.id.au>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/121143: [PATCH] audio/cdparanoia: rip multisession CDs correctly
Message-ID:  <200802270818.m1R8IE6x024275@mail.frase.id.au>
Resent-Message-ID: <200802270900.m1R901Up095630@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121143
>Category:       ports
>Synopsis:       [PATCH] audio/cdparanoia: rip multisession CDs correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 27 09:00:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Fraser Tweedale
>Release:        FreeBSD 7.0-RC2 i386
>Organization:
>Environment:
System: FreeBSD bacardi 7.0-RC2 FreeBSD 7.0-RC2 #10: Sun Feb 17 21:57:41 EST 2008 Fraser@bacardi:/usr/obj/usr/src/sys/BACARDI i386


	
>Description:
	cdparanoia was having some difficulty on multisession and mixed-mode CDs
	including Enhanced CD and some copy protected CDs.  This patch fixes 
	cases where the final track was padded with random noise due to an 
	incorrect TOC.
>How-To-Repeat:
>Fix:


Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/cdparanoia/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	23 Sep 2007 11:26:06 -0000	1.14
+++ Makefile	27 Feb 2008 08:10:53 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	cdparanoia
 PORTVERSION=	3.9.8
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	audio sysutils
 MASTER_SITES=	http://www.xiph.org/paranoia/download/
 DISTNAME=	${PORTNAME}-${PORTVERSION:C/^3\./III-alpha/}
Index: files/patch-interface-common_interface.c
===================================================================
RCS file: /home/ncvs/ports/audio/cdparanoia/files/patch-interface-common_interface.c,v
retrieving revision 1.1
diff -u -r1.1 patch-interface-common_interface.c
--- files/patch-interface-common_interface.c	10 Jan 2003 01:06:33 -0000	1.1
+++ files/patch-interface-common_interface.c	27 Feb 2008 08:10:53 -0000
@@ -1,11 +1,8 @@
 Index: interface/common_interface.c
 ===================================================================
 RCS file: /home/cvs/cdparanoia/interface/common_interface.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.5
-diff -u -r1.1.1.1 -r1.5
---- interface/common_interface.c	2003/01/05 09:46:26	1.1.1.1
-+++ interface/common_interface.c	2003/01/06 21:39:53	1.5
+--- common_interface.c.orig	2008-02-27 16:51:54.000000000 +1000
++++ common_interface.c	2008-02-27 17:04:59.000000000 +1000
 @@ -13,12 +13,19 @@
  #include "utils.h"
  #include "smallft.h"
@@ -52,7 +49,7 @@
    int j;
    
    /* First off, make sure the 'starting sector' is >=0 */
-@@ -208,6 +219,8 @@
+@@ -208,14 +219,16 @@
    /* For a scsi device, the ioctl must go to the specialized SCSI
       CDROM device, not the generic device. */
  
@@ -61,7 +58,29 @@
    if (d->ioctl_fd != -1) {
      int result;
  
-@@ -231,6 +244,7 @@
+     ms_str.addr_format = CDROM_LBA;
+     result = ioctl(d->ioctl_fd, CDROMMULTISESSION, &ms_str);
+     if (result == -1) return -1;
+-
+     if (ms_str.addr.lba > 100) {
++#endif
+ 
+       /* This is an odd little piece of code --Monty */
+ 
+@@ -223,14 +236,20 @@
+       /* 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)) {
++#ifdef Linux
+ 	  if (d->disc_toc[j].dwStartSector > ms_str.addr.lba - 11400) 
+ 	    d->disc_toc[j].dwStartSector = ms_str.addr.lba - 11400;
++#elif defined(__FreeBSD__)
++      d->disc_toc[j].dwStartSector -= 11400;
++#endif
+ 	  break;
+ 	}
+       }
++#ifdef Linux
        return 1;
      }
    }

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802270818.m1R8IE6x024275>