Accepting request 229479 from home:dimstar:bnc872575
BAckport a patch from master OBS-URL: https://build.opensuse.org/request/show/229479 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/gstreamer-plugins-base?expand=0&rev=46
This commit is contained in:
parent
806f09d0ac
commit
dc35a0cad2
66
gstreamer-plugins-base-discid.patch
Normal file
66
gstreamer-plugins-base-discid.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 3e2add20f53d2543d495d32ab581e145be254013 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Dewender <gnome@JonnyJD.net>
|
||||
Date: Sat, 28 Sep 2013 13:19:02 +0200
|
||||
Subject: [PATCH] bug 708991: fix MB discids for trailing data tracks
|
||||
|
||||
MusicBrainz removes trailing data tracks from releases on the server
|
||||
and also for the calculation of the MusicBrainz Disc ID.
|
||||
---
|
||||
gst-libs/gst/audio/gstaudiocdsrc.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gst-libs/gst/audio/gstaudiocdsrc.c b/gst-libs/gst/audio/gstaudiocdsrc.c
|
||||
index 716ea0a..8296ab2 100644
|
||||
--- a/gst-libs/gst/audio/gstaudiocdsrc.c
|
||||
+++ b/gst-libs/gst/audio/gstaudiocdsrc.c
|
||||
@@ -1189,13 +1189,23 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
|
||||
gchar *ptr;
|
||||
gchar tmp[9];
|
||||
gulong i;
|
||||
+ unsigned int last_audio_track;
|
||||
guint leadout_sector;
|
||||
gsize digest_len;
|
||||
|
||||
s = g_string_new (NULL);
|
||||
|
||||
+ /* MusicBrainz doesn't consider trailing data tracks
|
||||
+ * data tracks up front stay, since the disc has to start with 1 */
|
||||
+ last_audio_track = 0;
|
||||
+ for (i = 0; i < src->priv->num_tracks; i++) {
|
||||
+ if (src->priv->tracks[i].is_audio) {
|
||||
+ last_audio_track = src->priv->tracks[i].num;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
leadout_sector =
|
||||
- src->priv->tracks[src->priv->num_tracks - 1].end + 1 + CD_MSF_OFFSET;
|
||||
+ src->priv->tracks[last_audio_track - 1].end + 1 + CD_MSF_OFFSET;
|
||||
|
||||
/* generate SHA digest */
|
||||
sha = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
@@ -1203,10 +1213,8 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
|
||||
g_string_append_printf (s, "%02X", src->priv->tracks[0].num);
|
||||
g_checksum_update (sha, (guchar *) tmp, 2);
|
||||
|
||||
- g_snprintf (tmp, sizeof (tmp), "%02X",
|
||||
- src->priv->tracks[src->priv->num_tracks - 1].num);
|
||||
- g_string_append_printf (s, " %02X",
|
||||
- src->priv->tracks[src->priv->num_tracks - 1].num);
|
||||
+ g_snprintf (tmp, sizeof (tmp), "%02X", last_audio_track);
|
||||
+ g_string_append_printf (s, " %02X", last_audio_track);
|
||||
g_checksum_update (sha, (guchar *) tmp, 2);
|
||||
|
||||
g_snprintf (tmp, sizeof (tmp), "%08X", leadout_sector);
|
||||
@@ -1214,7 +1222,7 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
|
||||
g_checksum_update (sha, (guchar *) tmp, 8);
|
||||
|
||||
for (i = 0; i < 99; i++) {
|
||||
- if (i < src->priv->num_tracks) {
|
||||
+ if (i < last_audio_track) {
|
||||
guint frame_offset = src->priv->tracks[i].start + CD_MSF_OFFSET;
|
||||
|
||||
g_snprintf (tmp, sizeof (tmp), "%08X", frame_offset);
|
||||
--
|
||||
1.8.1.3
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 9 09:27:49 UTC 2014 - dimstar@opensuse.org
|
||||
|
||||
- Add gstreamer-plugins-base-discid.patch: fix MB discids for
|
||||
trailing data tracks (bnc#872575, bgo#708991).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 9 20:59:20 UTC 2014 - zaitor@opensuse.org
|
||||
|
||||
|
@ -28,7 +28,9 @@ License: LGPL-2.1+ and GPL-2.0+
|
||||
Group: Productivity/Multimedia/Other
|
||||
Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/%{_name}-%{version}.tar.xz
|
||||
Source2: baselibs.conf
|
||||
Patch: aarch64-no-neon.patch
|
||||
Patch0: aarch64-no-neon.patch
|
||||
# PATCH-FIX-UPSTREAM gstreamer-plugins-base-discid.patch bnc#872575 bgo#708991 dimstar@opensuse.org -- fix MB discids for trailing data tracks
|
||||
Patch1: gstreamer-plugins-base-discid.patch
|
||||
BuildRequires: cdparanoia-devel
|
||||
BuildRequires: glib2-devel >= 2.32
|
||||
BuildRequires: gstreamer-devel >= 1.0.10
|
||||
@ -423,7 +425,8 @@ package.
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n %{_name}-%{version}
|
||||
%patch -p1
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
translation-update-upstream po gst-plugins-base-%{gst_branch}
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user