rpms/rhythmbox/F-11 rb-sj-metadata-gvfs-crasher.patch, NONE, 1.1 rhythmbox.spec, 1.246, 1.247
Bastien Nocera
hadess at fedoraproject.org
Thu May 7 22:25:35 UTC 2009
- Previous message (by thread): rpms/linsmith/EL-5 .cvsignore, 1.2, 1.3 import.log, 1.3, 1.4 linsmith.spec, 1.3, 1.4 sources, 1.2, 1.3
- Next message (by thread): 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: hadess
Update of /cvs/pkgs/rpms/rhythmbox/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15432
Modified Files:
rhythmbox.spec
Added Files:
rb-sj-metadata-gvfs-crasher.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
Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/F-11/rhythmbox.spec,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -p -r1.246 -r1.247
--- rhythmbox.spec 29 Apr 2009 17:05:16 -0000 1.246
+++ rhythmbox.spec 7 May 2009 22:25:04 -0000 1.247
@@ -3,7 +3,7 @@
Name: rhythmbox
Summary: Music Management Application
Version: 0.12.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ with exceptions and GFDL
Group: Applications/Multimedia
URL: http://projects.gnome.org/rhythmbox/
@@ -49,8 +49,9 @@ ExcludeArch: s390 s390x
# https://bugzilla.redhat.com/show_bug.cgi?id=428034
Patch0: rb-disable-power-plugin-by-default.patch
-# from upstream
+# 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
@@ -85,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/' '{}' ';'
@@ -221,6 +224,9 @@ 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)
- Previous message (by thread): rpms/linsmith/EL-5 .cvsignore, 1.2, 1.3 import.log, 1.3, 1.4 linsmith.spec, 1.3, 1.4 sources, 1.2, 1.3
- Next message (by thread): 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list