After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708991 - audiocdsrc: invalid musicbrainz discids because of trailing data tracks
audiocdsrc: invalid musicbrainz discids because of trailing data tracks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal major
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 732444 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-28 11:46 UTC by Johannes Dewender
Modified: 2014-07-22 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program to calculate the Disc ID using gstreamer (1.69 KB, text/x-csrc)
2013-09-28 11:46 UTC, Johannes Dewender
  Details
proposed fix, fetch the number of the last audio track (2.42 KB, patch)
2013-09-28 11:55 UTC, Johannes Dewender
committed Details | Review

Description Johannes Dewender 2013-09-28 11:46:16 UTC
Created attachment 255978 [details]
Test program to calculate the Disc ID using gstreamer

The MusicBrainz Disc ID is defined to ignore trailing data tracks (multi-session discs) like mentioned in
http://musicbrainz.org/doc/Disc_ID_Calculation#Multi-session_.28audio_.2B_data.29_CD
This is also how it is implemented in http://musicbrainz.org/doc/libdiscid

The audiocdsrc plugin in the base plugin package of gstreamer calculates the Disc ID including the trailing data tracks.
So discs with data tracks can't be found on MusicBrainz and even worse: it pushes users to add wrong releases including the data track to MusicBrainz to "fix this".

This currently comes up on MusicBrainz since Rhythmbox >= 2.98 switched to using gstreamer for discid calculation, rather than libdiscid (up until 2.97).
Comment 1 Johannes Dewender 2013-09-28 11:55:17 UTC
Created attachment 255979 [details] [review]
proposed fix, fetch the number of the last audio track

I add a patch that fixes this the same as recent versions of libdiscid:
https://github.com/metabrainz/libdiscid/blob/eef09db2bcf5c611025fe62215c1435d7b9d9b88/src/toc.c#L54

Previous versions of libdiscid did it different. This way has the advantage to cope with discs that have multiple data tracks.

Also note that data tracks at the start of the TOC (like done with PC games sometimes) don't get cut off, since the first track is expected to be track 1.

Tested with the test program mentioned above and various discs (with and without data tracks). Compared with the result from libdiscid.

The patch was done against current git master.
Comment 2 Johannes Dewender 2013-09-28 12:24:51 UTC
The whole test program, including a quick Makefile is in https://gist.github.com/JonnyJD/6741103

You can compare it against the "official Disc ID" with the "discid" example program from libdiscid:

git clone https://github.com/metabrainz/libdiscid.git
cd libdiscid
./autogen.sh
./configure
make

and then
./discid
Comment 3 Sebastian Dröge (slomo) 2013-10-01 20:25:34 UTC
commit 019ef0747dabddb873babbfc91ee77b26e574adf
Author: Johannes Dewender <gnome@JonnyJD.net>
Date:   Sat Sep 28 13:19:02 2013 +0200

    audiocdsrc: Don't consider trailing data tracks for MusicBrainz disc id calculation
    
    MusicBrainz removes trailing data tracks from releases on the server
    and also for the calculation of the MusicBrainz Disc ID.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708991
Comment 4 Sebastian Dröge (slomo) 2014-06-30 06:59:50 UTC
*** Bug 732444 has been marked as a duplicate of this bug. ***
Comment 5 Johannes Dewender 2014-07-22 10:30:52 UTC
Sorry to spam in here, but since we are still seeing this on the MusicBrainz server I want to add a note where this fix was released:

The fix is in gst-plugins-base1.0 (1.3.1-1; debian)
which is not yet in Trusty Tahr, but will be in Utopic Unicorn.
Comment 6 Johannes Dewender 2014-07-22 10:50:03 UTC
Which is kind of bad, because Trusty Tahr is an LTS release so the 1.2.x version will stay around until 2016 and submit wrong disc IDs on the MusicBrainz server.

So if that fix could be included in an 1.2.x release that would be great.
1.2.4 doesn't include this fix.
Comment 7 Tim-Philipp Müller 2014-07-22 11:00:35 UTC
I just picked this into the 1.2 branch. There might be another 1.2 release (1.2.5), but even if there is, I'm not sure if the ubuntu folks would pick it up, even if it's just a bug-fix release.
Comment 8 Johannes Dewender 2014-07-22 11:23:38 UTC
Thanks.

Well when an 1.2.5 is out I will open an Ubuntu ticket and point every MB/Trusty user sending wrong disc IDs there.
There is a  chance that somewhere before the support for trusty runs out in 2019 (Oo) a fixed package is released.

We might additionally provide a package in the MusicBrainz PPA, but that wouldn't reach as many users.

There is also Debian Wheezy, running 1.2.x and having support ca. until 2016 and possibly other distributions.
OpenSUSE 13.1 has 1.2.4 and has support until the end of 2016.
I didn't check others.