GNOME Bugzilla – Bug 315144
gstreamer-cdparanoia gst_pad_query invalid data
Last modified: 2005-10-06 15:05:56 UTC
Distribution/Version: SuSE 10 Beta 3 The gstreamer-cdparanoia plugin reports invalid sector data (always 0) on gst_pad_query() calls for getting disk/track information which is needed to calculate offsets and track durations for CD tracks. The problem also affects Goobox, and has been confirmed on SuSE 10, Ubuntu Breezy, and Foresight Linux. The problem was patched, and the bug we filed internally for getting Banshee to work is here: https://bugzilla.novell.com/show_bug.cgi?id=113937
Created attachment 51735 [details] Source to testcase demonstrating bug Just running this testcase should exhibit the bug: total_sectors will be 0, while n_tracks should be correct: the number of tracks on the audio CD being tested (/dev/hdc by default). Compile, insert audio CD, wait for it to spin and settle, and then run the program.
Created attachment 51736 [details] [review] Patch against our gstreamer-plugins package, fixes the bug. (This paraphrases hpj's comments regarding his attached patch) Here's a patch that fixes the problem with GStreamer's cdparanoia plugin. The bug is entirely in the plugin, and not caused by any inconsistency in cdparanoia. The problem was that the plugin has to be in "track mode" for a support function, get_first_sector(), to return a non-zero value for sector count. It will then return the sector count of the passed-in track. I just made an exception so that if not in "track mode", it returns the sector count of the entire CD, just as it will return the total number of tracks if that's what you ask for. I changed the reporting function, not get_first_sector() itself, because there is too much code depending on it.
Please confirm that this doesn't break gnome-cd, sound-juicer or totem. Each of them has very fragile ( :-( ) interaction with this plugin when it comes to getting per-track playback, per-track seeking, track-transitions etc. right.
Should have mentioned that I also tested those three, plus goobox. All four applications work fine for CD playback, and each application reports correct track durations, and can seek to and within tracks. Neither sound-juicer, gnome-cd, nor totem ever had a problem getting sector information before this patch, and the patch does not prevent them from doing so now.
I think there's a similar patch at bug #313209. Are the patch fixing the same bug ? (i've not looked closely at them yet). thanks!
I like the approach of bug #313209 better. I have tested it and verified that it works with sound-juicer and totem. gnome-cd has never worked for me. Closing this bug as a dup. *** This bug has been marked as a duplicate of 313209 ***