rpms/rhythmbox/devel rb-sj-metadata-gvfs-crasher.patch, NONE, 1.1 rb-wknc-urls.patch, NONE, 1.1 rhythmbox.spec, 1.245, 1.246

Bastien Nocera hadess at fedoraproject.org
Thu May 7 22:30:47 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16725

Modified Files:
	rhythmbox.spec 
Added Files:
	rb-sj-metadata-gvfs-crasher.patch rb-wknc-urls.patch 
Log Message:
* Thu May 07 2009 Bastien Nocera <bnocera at redhat.com> 0.12.1-3
- Add patch for sound-juicer changes

rb-sj-metadata-gvfs-crasher.patch:

--- NEW FILE rb-sj-metadata-gvfs-crasher.patch ---
diff --git a/plugins/audiocd/sj-metadata-getter.c b/plugins/audiocd/sj-metadata-getter.c
index 4a55ecd..9e5e6c9 100644
--- a/plugins/audiocd/sj-metadata-getter.c
+++ b/plugins/audiocd/sj-metadata-getter.c
@@ -22,6 +22,7 @@
 
 #include <glib-object.h>
 #include <glib/gi18n.h>
+#include "sj-structures.h"
 #include "sj-metadata-getter.h"
 #include "sj-metadata-marshal.h"
 #include "sj-metadata.h"
@@ -155,11 +156,10 @@ sj_metadata_getter_set_proxy_port (SjMetadataGetter *mdg, const int proxy_port)
 static gboolean
 fire_signal_idle (SjMetadataGetterSignal *signal)
 {
+  /* The callback is the sucker, and now owns the albums list */
   g_signal_emit_by_name (G_OBJECT (signal->mdg), "metadata",
   			 signal->albums, signal->error);
 
-  /* This will kill the albums, as
-   * those belong to the metadata backend */
   if (signal->metadata)
     g_object_unref (signal->metadata);
   if (signal->error != NULL)
diff --git a/plugins/audiocd/sj-metadata-gvfs.c b/plugins/audiocd/sj-metadata-gvfs.c
index fcf68c3..fc41d51 100644
--- a/plugins/audiocd/sj-metadata-gvfs.c
+++ b/plugins/audiocd/sj-metadata-gvfs.c
@@ -35,7 +35,6 @@
 struct SjMetadataGvfsPrivate {
   char *cdrom;
   char *uri;
-  GList *albums;
 };
 
 #define GET_PRIVATE(o)  \
@@ -71,9 +70,10 @@ static GList *
 gvfs_list_albums (SjMetadata *metadata, char **url, GError **error)
 {
   SjMetadataGvfsPrivate *priv;
+  GList *albums = NULL;
   AlbumDetails *album;
   GError *my_error = NULL;
-  GFile *file;
+  GFile *file = NULL;
   GFileInfo *info;
   GFileEnumerator *e;
   guint i = 0;
@@ -84,8 +84,7 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error)
 
   if (priv->uri == NULL) {
     g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD"));
-    priv->albums = NULL;
-    return NULL;
+    goto bail;
   }
 
   file = g_file_new_for_uri (priv->uri);
@@ -134,25 +133,26 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error)
     track->duration = g_file_info_get_attribute_uint64 (info, "xattr::org.gnome.audio.duration");
     album->number++;
     g_object_unref (info);
+
+    album->tracks = g_list_append (album->tracks, track);
   }
   g_object_unref (e);
 
-  priv->albums = g_list_append (NULL, album);
+  albums = g_list_append (albums, album);
 
-  return priv->albums;
+  return albums;
 
 bail:
 
-  g_object_unref (file);
-  g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD: %s"), my_error->message);
-  g_error_free (my_error);
-  g_list_foreach (priv->albums, (GFunc)album_details_free, NULL);
-  g_list_free (priv->albums);
-  priv->albums = NULL;
+  if (file)
+    g_object_unref (file);
+  if (my_error) {
+    g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD: %s"), my_error->message);
+    g_error_free (my_error);
+  }
   return NULL;
 }
 
-
 /**
  * GObject methods
  */
@@ -190,8 +190,7 @@ sj_metadata_gvfs_set_property (GObject *object, guint property_id,
 
   switch (property_id) {
   case PROP_DEVICE:
-    if (priv->cdrom)
-      g_free (priv->cdrom);
+    g_free (priv->cdrom);
     priv->cdrom = g_value_dup_string (value);
     priv->uri = device_to_cdda_uri (priv->cdrom);
     break;
@@ -210,8 +209,6 @@ sj_metadata_gvfs_finalize (GObject *object)
   SjMetadataGvfsPrivate *priv = SJ_METADATA_GVFS (object)->priv;
   g_free (priv->cdrom);
   g_free (priv->uri);
-  g_list_foreach (priv->albums, (GFunc)album_details_free, NULL);
-  g_list_free (priv->albums);
 }
 
 static void
>From e92b552894ed5560bc75fbd6ac99be96831d1c80 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Thu, 07 May 2009 22:16:00 +0000
Subject: Fix memleak with latest libjuicer changes

See bug #581775, the albums list is owned by the signal callback.
---
diff --git a/plugins/audiocd/rb-audiocd-source.c b/plugins/audiocd/rb-audiocd-source.c
index b0f214c..c8456db 100644
--- a/plugins/audiocd/rb-audiocd-source.c
+++ b/plugins/audiocd/rb-audiocd-source.c
@@ -598,6 +598,11 @@ metadata_cb (SjMetadataGetter *metadata,
 		cd_track = g_list_next (cd_track);
 	}
 
+	/* And free the albums list, as it belongs to us, not
+	 * the metadata getter */
+	g_list_foreach (albums, (GFunc)album_details_free, NULL);
+	g_list_free (albums);
+
 	g_object_unref (metadata);
 	priv->metadata = NULL;
 
@@ -611,6 +616,8 @@ metadata_cancelled_cb (SjMetadataGetter *metadata,
 		       gpointer old_source)
 {
 	/* NOTE: the source may have been finalised, and so should NOT be used*/
+	g_list_foreach (albums, (GFunc)album_details_free, NULL);
+	g_list_free (albums);
 	g_object_unref (metadata);
 }
 #endif
--
cgit v0.8.2

rb-wknc-urls.patch:

--- NEW FILE rb-wknc-urls.patch ---
diff -up rhythmbox-0.12.1/plugins/iradio/iradio-initial.pls.wknc-url rhythmbox-0.12.1/plugins/iradio/iradio-initial.pls
--- rhythmbox-0.12.1/plugins/iradio/iradio-initial.pls.wknc-url	2009-04-28 14:39:11.250808134 -0400
+++ rhythmbox-0.12.1/plugins/iradio/iradio-initial.pls	2009-04-28 15:56:06.111426708 -0400
@@ -37,13 +37,13 @@ file9=http://ubuntu.hbr1.com:19800/ambie
 title9=HBR1.com - Dream Factory
 genre9=Ambient
 
-# http://www.wknc.org/listen.php
-file10=http://wknc.org:8000/wknclq.ogg.m3u
-title10=WKNC 88.1 FM (NC State) (Modem)
+# http://www.wknc.org/listen/
+file10=http://wknc.sma.ncsu.edu:8000/wkncmq.ogg.m3u
+title10=WKNC 88.1 FM (NC State) (Low Quality)
 genre10=Music
 
-file11=http://wknc.org:8000/wkncmq.ogg.m3u
-title11=WKNC 88.1 FM (NC State) (Broadband)
+file11=http://wknc.sma.ncsu.edu:8000/wknchq.ogg.m3u
+title11=WKNC 88.1 FM (NC State) (High Quality)
 genre11=Music
 
 # http://www.cbc.ca/listen/ogg.html


Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -p -r1.245 -r1.246
--- rhythmbox.spec	28 Apr 2009 09:07:01 -0000	1.245
+++ rhythmbox.spec	7 May 2009 22:30:16 -0000	1.246
@@ -1,9 +1,9 @@
 %define desktop_file_utils_version 0.9
 
 Name: rhythmbox
-Summary: Music Management Application 
+Summary: Music Management Application
 Version: 0.12.1
-Release: 1%{?dist}
+Release: 3%{?dist}
 License: GPLv2+ with exceptions and GFDL
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/rhythmbox/
@@ -49,6 +49,9 @@ ExcludeArch:    s390 s390x
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=428034
 Patch0: rb-disable-power-plugin-by-default.patch
+# Already upstream
+Patch1: rb-wknc-urls.patch
+Patch2: rb-sj-metadata-gvfs-crasher.patch
 
 %description
 Rhythmbox is an integrated music management application based on the powerful
@@ -83,6 +86,8 @@ from, and sending media to UPnP/DLNA net
 %setup -q
 
 %patch0 -p0 -b .dont-disable-suspend
+%patch1 -p1 -b .wknc
+%patch2 -p1 -b .sj
 
 # Use the installed louie, not the one in Coherence
 find plugins/coherence/upnp_coherence/ -type f -exec sed -i 's/coherence.extern.louie as louie/louie/' '{}' ';'
@@ -219,6 +224,12 @@ fi
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Thu May 07 2009 Bastien Nocera <bnocera at redhat.com> 0.12.1-3
+- Add patch for sound-juicer changes
+
+* Wed Apr 29 2009 - Matthias Clasen <mclasen at redhat.com> - 0.12.1-2
+- Update WKNC urls (#498258)
+
 * Tue Apr 28 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.1-1
 - Update to 0.12.1
 




More information about the scm-commits mailing list