GNOME Bugzilla – Bug 313209
[cdparanoia] wrong track info
Last modified: 2005-10-06 15:05:39 UTC
Please describe the problem: the cdparanoia plugin doesn't return the right track info from a cd, it always return 0 track length, this happens with version 0.8.10, works good with 0.8.8 Steps to reproduce: 1. insert a cd in the cd drive 2. execute gst-plugins/examples/seeking/cdparanoia 3. look at the track info Actual results: track length is always 0 Expected results: the right track length to be printed out. Does this happen every time? yes Other information:
I think I found whats causing it. During the inclusion of the track_mode-stuff there was also the function get_first_sector(). This function replaced some former direct calls to cdparanoia. But it has an (in my eyes useless) check for track_mode returning 0 if not in track_mode. See: static guint get_first_sector (CDParanoia * src, guint track) { if (!src->track_mode) return 0; else if (track == src->d->tracks) return src->last_sector + 1; else return cdda_track_firstsector (src->d, track + 1); } This unfortunately locks out the call to cddb_track_firstsector, which works even when not in track_mode. I think the function could be as simple as: static guint get_first_sector (CDParanoia * src, guint track) { if (track == src->d->tracks) return src->last_sector + 1; else return cdda_track_firstsector (src->d, track + 1); } or even shorter: static guint get_first_sector (CDParanoia * src, guint track) { return ((track == src->d->tracks) ? src->last_sector + 1 : cdda_track_firstsector (src->d, track + 1)); } From what I can see this doesn't interfere with Totem or gnome-cd
Can you please attach a patch?
Created attachment 51823 [details] [review] simple patch This a patch doing what I described earlier. It's done with gst-plugins-0.8.10 but it should apply to 0.8.11 (==CVS), which I couldn't test yet, too.
Ok, I got around to test it with gstreamer/gst-plugins-0.8.11 now: Patch applies and works nicely here.
I think there's a similar patch at bug #315144. Are the patch fixing the same bug ? (i've not looked closely at them yet). thanks!
*** Bug 315144 has been marked as a duplicate of this bug. ***
Patch committed, thanks.