summaryrefslogtreecommitdiff
path: root/multimedia/kdemultimedia3/patches/patch-cu
blob: 890f022db268913491bdcbe4a9e49f251bf6627a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-cu,v 1.7 2006/06/21 19:19:36 joerg Exp $

--- kioslave/audiocd/audiocd.cpp.orig	2006-05-22 18:06:24.000000000 +0000
+++ kioslave/audiocd/audiocd.cpp
@@ -26,8 +26,8 @@
 
 extern "C"
 {
-	#include <cdda_interface.h>
-	#include <cdda_paranoia.h>
+	#include <cdparanoia/cdda_interface.h>
+	#include <cdparanoia/cdda_paranoia.h>
 	void paranoiaCallback(long, int);
 
 	#include <kdemacros.h>
@@ -213,7 +213,11 @@ struct cdrom_drive * AudioCDProtocol::in
 		return 0;
 
 	// Update our knowledge of the disc
+#if defined(Q_OS_FREEBSD)
+	d->cd.setDevice(drive->cdda_device_name, 50, false);
+#else
 	d->cd.setDevice(drive->ioctl_device_name, 50, false);
+#endif
 #if 0
 	// FreeBSD's cdparanoia as of january 5th 2006 has rather broken
 	// support for non-SCSI devices. Although it finds ATA cdroms just
@@ -857,7 +861,7 @@ void AudioCDProtocol::paranoiaRead(
 		 * 2) Only increase in size unless the decrease is %5 of last estimate.
 		 * This prevents continues small changes which is just annoying.
 		 */
-		unsigned long end = lastSector - firstSector;
+		unsigned long end = lastSector - firstSector + 1;
 		unsigned long cur = currentSector - firstSector;
 		unsigned long estSize = (processed / cur ) * end;