From Fraser@mail.frase.id.au  Wed Feb 27 08:55:35 2008
Return-Path: <Fraser@mail.frase.id.au>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 469B01065672
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 27 Feb 2008 08:55:35 +0000 (UTC)
	(envelope-from Fraser@mail.frase.id.au)
Received: from mail.frase.id.au (60-240-186-49.tpgi.com.au [60.240.186.49])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F89913C455
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 27 Feb 2008 08:55:34 +0000 (UTC)
	(envelope-from Fraser@mail.frase.id.au)
Received: from mail.frase.id.au (localhost [127.0.0.1])
	by mail.frase.id.au (8.14.2/8.14.2) with ESMTP id m1R8IExs024276
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 27 Feb 2008 18:18:14 +1000 (EST)
	(envelope-from Fraser@mail.frase.id.au)
Received: (from root@localhost)
	by mail.frase.id.au (8.14.2/8.14.2/Submit) id m1R8IE6x024275;
	Wed, 27 Feb 2008 18:18:14 +1000 (EST)
	(envelope-from Fraser)
Message-Id: <200802270818.m1R8IE6x024275@mail.frase.id.au>
Date: Wed, 27 Feb 2008 18:18:14 +1000 (EST)
From: Fraser Tweedale <frase@frase.id.au>
Reply-To: Fraser Tweedale <frase@frase.id.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] audio/cdparanoia: rip multisession CDs correctly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         121143
>Category:       ports
>Synopsis:       [PATCH] audio/cdparanoia: rip multisession CDs correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    markus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 27 09:00:01 UTC 2008
>Closed-Date:    Sun Dec 12 03:08:29 UTC 2010
>Last-Modified:  Sun Dec 12 03:08:29 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->markus 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Feb 27 09:00:08 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121143 

From: Tobias Rehbein <tobias.rehbein@web.de>
To: bug-followup@FreeBSD.org
Cc: markus@FreeBSD.org
Subject: Re: ports/121143: [PATCH] audio/cdparanoia: rip multisession CDs correctly
Date: Sat, 7 Mar 2009 15:29:08 +0100

 This PR seems to be forgotten. Anyway I want to mention the issue addressed by
 the patch still exists. As cdparanoia III 10.2 has been released and
 svn.xiph.org shows this issue is fixed in this release I would suggest to close
 this PR and update the cdparanoia port to the latest version.
 
 Markus, is there any chance you'll update the cdparanoia port in the near
 future?
 
 Regards Tobias
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Sun Dec 12 03:08:27 UTC 2010 
State-Changed-Why:  
please submit a pr for an update to 10.2 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121143 
>Unformatted:
