[Top][All Lists]

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

Re: [Libcdio-devel] Ready for testing: libcdio branch trackno-higher-one

From: Thomas Schmitt
Subject: Re: [Libcdio-devel] Ready for testing: libcdio branch trackno-higher-one with .cue files
Date: Sat, 29 Dec 2018 20:24:17 +0100


please try with:

Long story:

Edd Barrett wrote:
> Well the behaviour certainly changed!

(Hairs raising ...)

>        TOC entry claims an overly large start offset: massaging.
>        TOC entry claims a negative start offset: massaging.
>        TOC entries claim non-increasing offsets: massaging.

The code in lib/cdda_interface/common_interface.c looks like
has gone mad.
It gets filled in lib/cdda_interface/cddap_interface.c function
cddap_readtoc(). That code looks ok, though.

gdb is somewhat handicapped by the optimizer efforts of gcc.
But i can see that with my tracks 4 and 5
  cdio_get_track_lsn(d->p_cdio, 4) yields 0
  cdio_get_track_lsn(d->p_cdio, 5) yields 0
and lead-out
  cdio_get_track_lsn(d->p_cdio, 6) yields -150

This is implemented in cdio_get_track_lsn() as
  return cdio_lba_to_lsn(p_cdio->op.get_track_lba (p_cdio->env, u_track));
with u_track = {4, 5,6} in my case.
  p_cdio->op.get_track_lba == _get_lba_track_bincue

cd-info gets the start address from _get_track_msf_image().
_get_lba_track_bincue has similar problems as _get_track_msf_image had.


diff --git a/lib/driver/image/bincue.c b/lib/driver/image/bincue.c
index 8c980bc..60f153f 100644
--- a/lib/driver/image/bincue.c
+++ b/lib/driver/image/bincue.c
@@ -1142,10 +1142,11 @@ _get_lba_track_bincue(void *p_user_data, track_t 
   _img_private_t *p_env = p_user_data;
-  if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1;
+  if (i_track == CDIO_CDROM_LEADOUT_TRACK)
+    i_track = p_env->gen.i_tracks + p_env->gen.i_first_track;
   if (i_track <= p_env->gen.i_tracks + p_env->gen.i_first_track
-      && i_track != 0) {
+      && i_track >= p_env->gen.i_first_track) {
     return p_env->tocent[i_track-p_env->gen.i_first_track].start_lba;
   } else
     return CDIO_INVALID_LBA;


Using cdda library version: 10.2+0.94+2git x86_64-unknown-linux-gnu
Using paranoia library version: 10.2+0.94+2git x86_64-unknown-linux-gnu
Checking test/data/cdda_track_4_5.cue for cdrom...
Verifying drive can read CDDA...
        Expected command set reads OK.

Attempting to determine drive endianness from data.....
        Data appears to be coming back Little Endian.
        certainty: 100%

Attempting to set cdrom to full speed... 
405: Option not supported by drive
        CDROM speed set FAILED. Continuing anyway...

Table of contents (audio tracks only):
track        length               begin        copy pre ch
  4.      150 [00:02.00]        0 [00:00.00]    OK   no  2
  5.      152 [00:02.02]      150 [00:02.00]    OK   no  2
TOTAL     302 [00:04.02]    (audio only)
[Inferior 1 (process 15683) exited normally]


Committed this change and hereby ask for testing.

Have a nice day :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]