pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/34107: multimedia/xine-lib: CDDA playing skips the first few seconds of tracks



>Number:         34107
>Category:       pkg
>Synopsis:       multimedia/xine-lib: CDDA playing skips the first few seconds 
>of tracks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 29 02:40:00 +0000 2006
>Originator:     Kimura Fuyuki
>Release:        NetBSD 3.99.23
>Organization:
        
>Environment:
        
        
System: NetBSD lapis.hadaly.org 3.99.23 NetBSD 3.99.23 (LAPIS) #51: Fri Jul 28 
06:13:42 JST 2006 
fuyuki%lapis.hadaly.org@localhost:/usr/obj/sys/arch/i386/compile/LAPIS i386
Architecture: i386
Machine: i386
>Description:
CDDA playing skips the first few seconds of tracks.
        
>How-To-Repeat:
        
>Fix:
        
The following patch corrects the msf->lba conversion by subtracting
the predefined offset value. I believe the same fix is required for at
least FreeBSD but I can't test it at all.

http://fxr.watson.org/fxr/source/dev/scsipi/cd.c?v=NETBSD
http://fxr.watson.org/fxr/source/dev/ata/atapi-cd.c

cvs diff: Diffing .
Index: distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/multimedia/xine-lib/distinfo,v
retrieving revision 1.34
diff -u -r1.34 distinfo
--- distinfo    24 Jul 2006 20:42:07 -0000      1.34
+++ distinfo    29 Jul 2006 00:20:47 -0000
@@ -16,7 +16,7 @@
 SHA1 (patch-ak) = 34b41bf29efeb1d0fa29b22d419d7665e33d2cb2
 SHA1 (patch-al) = 9e3ad86a7d7f32e58de157fa37141138af10838e
 SHA1 (patch-am) = 10f6433a8549bdce60ace5dcbd51df85eaa7ea16
-SHA1 (patch-an) = 35d19acaefc126825bf8391ba4ef46b680a71dfb
+SHA1 (patch-an) = 769e2227b79438fa0984f69c6258baa7af7074fb
 SHA1 (patch-ao) = c5bbffceb34516951d2f19558bb6e082376ab195
 SHA1 (patch-ap) = aaf63024c1049c1f2175d9974367a6b84ac3028f
 SHA1 (patch-aq) = 6f486b79dcb14155f613df44b10ef8223b44167e
cvs diff: Diffing patches
Index: patches/patch-an
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/multimedia/xine-lib/patches/patch-an,v
retrieving revision 1.6
diff -u -r1.6 patch-an
--- patches/patch-an    24 Jul 2006 20:42:07 -0000      1.6
+++ patches/patch-an    29 Jul 2006 00:20:47 -0000
@@ -11,7 +11,15 @@
  #include <sys/param.h>
  #endif
  #ifdef HAVE_DIRENT_H
-@@ -613,14 +613,20 @@ static int read_cdrom_frames(cdda_input_
+@@ -86,6 +86,7 @@
+ #define CD_FRAMES_PER_SECOND    75
+ #define CD_RAW_FRAME_SIZE       2352
+ #define CD_LEADOUT_TRACK        0xAA
++#define CD_BLOCK_OFFSET         150
+ 
+ typedef struct _cdrom_toc_entry {
+   int   track_mode;
+@@ -613,14 +614,20 @@ static int read_cdrom_frames(cdda_input_
    return 0;
  }
  
@@ -33,7 +41,7 @@
    int i;
  
    /* fetch the table of contents */
-@@ -646,13 +652,26 @@ static int read_cdrom_toc(int fd, cdrom_
+@@ -646,13 +653,26 @@ static int read_cdrom_toc(int fd, cdrom_
  
      memset(&tocentry, 0, sizeof(tocentry));
  
@@ -60,7 +68,7 @@
      toc->toc_entries[i-1].track_mode = (tocentry.entry.control & 0x04) ? 1 : 
0;
      toc->toc_entries[i-1].first_frame_minute = tocentry.entry.addr.msf.minute;
      toc->toc_entries[i-1].first_frame_second = tocentry.entry.addr.msf.second;
-@@ -661,18 +680,41 @@ static int read_cdrom_toc(int fd, cdrom_
+@@ -661,18 +681,41 @@ static int read_cdrom_toc(int fd, cdrom_
        (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * 
CD_FRAMES_PER_SECOND) +
        (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
         tocentry.entry.addr.msf.frame;
@@ -72,7 +80,7 @@
 +    toc->toc_entries[i-1].first_frame =
 +      (tocentry.data->addr.msf.minute * CD_SECONDS_PER_MINUTE * 
CD_FRAMES_PER_SECOND) +
 +      (tocentry.data->addr.msf.second * CD_FRAMES_PER_SECOND) +
-+       tocentry.data->addr.msf.frame;
++       tocentry.data->addr.msf.frame - CD_BLOCK_OFFSET;
 +#endif
    }
  
@@ -102,7 +110,7 @@
    toc->leadout_track.track_mode = (tocentry.entry.control & 0x04) ? 1 : 0;
    toc->leadout_track.first_frame_minute = tocentry.entry.addr.msf.minute;
    toc->leadout_track.first_frame_second = tocentry.entry.addr.msf.second;
-@@ -681,6 +723,16 @@ static int read_cdrom_toc(int fd, cdrom_
+@@ -681,6 +724,16 @@ static int read_cdrom_toc(int fd, cdrom_
      (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * 
CD_FRAMES_PER_SECOND) +
      (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
       tocentry.entry.addr.msf.frame;
@@ -114,12 +122,12 @@
 +  toc->leadout_track.first_frame =
 +    (tocentry.data->addr.msf.minute * CD_SECONDS_PER_MINUTE * 
CD_FRAMES_PER_SECOND) +
 +    (tocentry.data->addr.msf.second * CD_FRAMES_PER_SECOND) +
-+     tocentry.data->addr.msf.frame;
++     tocentry.data->addr.msf.frame - CD_BLOCK_OFFSET;
 +#endif
  
    return 0;
  }
-@@ -689,12 +741,12 @@ static int read_cdrom_frames(cdda_input_
+@@ -689,12 +742,12 @@ static int read_cdrom_frames(cdda_input_
    unsigned char *data) {
  
    int fd = this_gen->fd;
@@ -135,7 +143,7 @@
      cdda.address_format = CD_MSF_FORMAT;
      cdda.address.msf.minute = frame / CD_SECONDS_PER_MINUTE / 
CD_FRAMES_PER_SECOND;
      cdda.address.msf.second = (frame / CD_FRAMES_PER_SECOND) % 
CD_SECONDS_PER_MINUTE;
-@@ -712,6 +764,33 @@ static int read_cdrom_frames(cdda_input_
+@@ -712,6 +765,33 @@ static int read_cdrom_frames(cdda_input_
        perror("CDIOCREADAUDIO");
        return -1;
      }

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index