[audacious-plugins/f15] Fix several issues and crashes in the moodbar plugin. Fix file transport in the streambrowser plugin

Michael Schwendt mschwendt at fedoraproject.org
Wed Jul 13 11:43:32 UTC 2011


commit 81d1ac685ab103dad78643f835b5397c429a8c68
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Wed Jul 13 13:42:46 2011 +0200

    Fix several issues and crashes in the moodbar plugin.
    Fix file transport in the streambrowser plugin.
    Warning:
    Streambrowser has been removed from Audacious upstream (#718685)
    due to several issues, such as race condition crashes and Shoutcast
    support that no longer works.

 audacious-plugins-2.5.3-moodbar.patch       |   44 +++++++++++++++++++++
 audacious-plugins-2.5.3-streambrowser.patch |   56 +++++++++++++++++++++++++++
 audacious-plugins.spec                      |   16 +++++++-
 3 files changed, 115 insertions(+), 1 deletions(-)
---
diff --git a/audacious-plugins-2.5.3-moodbar.patch b/audacious-plugins-2.5.3-moodbar.patch
new file mode 100644
index 0000000..92f9626
--- /dev/null
+++ b/audacious-plugins-2.5.3-moodbar.patch
@@ -0,0 +1,44 @@
+diff -Nurb audacious-plugins-2.5.3-orig/src/moodbar/moodbar.c audacious-plugins-2.5.3/src/moodbar/moodbar.c
+--- audacious-plugins-2.5.3-orig/src/moodbar/moodbar.c	2011-06-30 00:06:11.000000000 +0200
++++ audacious-plugins-2.5.3/src/moodbar/moodbar.c	2011-07-13 12:13:06.000000000 +0200
+@@ -33,8 +33,11 @@
+ 	g_return_val_if_fail(filename != NULL, NULL);
+ 
+ 	ret = g_new0(GdkColor, 1000);
+-	vfs_file_get_contents(filename, (void **) &data, &size);
++	if (!vfs_file_test(filename, G_FILE_TEST_EXISTS)) {
++		return ret;
++	}
+ 
++	vfs_file_get_contents(filename, (void **) &data, &size);
+ 	for (it = data, col = ret; (it - data) < size; it += 3, col++)
+ 	{
+ 		gint16 c = *it;
+@@ -125,13 +128,16 @@
+ static gboolean expose_event(GtkWidget * widget)
+ {
+ 	gint playlist, pos;
+-	gchar *file, *ext;
++	gchar *file, *ext, *pfile;
+ 	gchar *moodfile;
+ 
+ 	playlist = aud_playlist_get_playing();
+ 	pos = aud_playlist_get_position(playlist);
+-	file = g_strdup(aud_playlist_entry_get_filename(playlist, pos));
+-
++	pfile = aud_playlist_entry_get_filename(playlist, pos);
++	if (pfile == NULL) {
++		return TRUE;
++	}
++	file = g_strdup(pfile);
+ 	ext = strrchr(file, '.');
+ 	if (ext != NULL)
+ 		*ext = '\0';
+@@ -207,6 +213,7 @@
+ static gboolean moodbar_init(void)
+ {
+ 	area = gtk_drawing_area_new();
++	g_object_ref_sink(area);
+ 	gtk_widget_show(area);
+ 
+ 	hook_associate("playback begin", (HookFunction) playback_begin, area);
diff --git a/audacious-plugins-2.5.3-streambrowser.patch b/audacious-plugins-2.5.3-streambrowser.patch
new file mode 100644
index 0000000..df9714f
--- /dev/null
+++ b/audacious-plugins-2.5.3-streambrowser.patch
@@ -0,0 +1,56 @@
+diff -Nurb audacious-plugins-2.5.3-orig/src/streambrowser/streambrowser.c audacious-plugins-2.5.3/src/streambrowser/streambrowser.c
+--- audacious-plugins-2.5.3-orig/src/streambrowser/streambrowser.c	2011-06-30 00:06:11.000000000 +0200
++++ audacious-plugins-2.5.3/src/streambrowser/streambrowser.c	2011-07-13 12:25:46.000000000 +0200
+@@ -323,8 +323,9 @@
+ 
+ static gboolean sb_init (void)
+ {
+-    /* Preload http:// transport for access from secondary thread */
++    /* Preload transports for access from secondary thread */
+     vfs_prepare ("http");
++    vfs_prepare ("file");
+ 
+     AUDDBG("sb_init()\n");
+     config_load ();
+@@ -368,7 +369,9 @@
+     streambrowser_win_set_update_function (streamdir_update);
+ 
+     /* others */
++    if (update_thread_mutex == NULL)
+     update_thread_mutex = g_mutex_new ();
++    if (update_thread_data_queue == NULL)
+     update_thread_data_queue = g_queue_new ();
+ 
+     AUDDBG("gui initialized\n");
+@@ -378,14 +381,6 @@
+ 
+ static void gui_done ()
+ {
+-    /* others */
+-    if (update_thread_mutex)
+-        g_mutex_free (update_thread_mutex);
+-    update_thread_mutex = NULL;
+-    if (update_thread_data_queue)
+-        g_queue_free (update_thread_data_queue);
+-    update_thread_data_queue = NULL;
+-
+     AUDDBG("gui destroyed\n");
+ }
+ 
+@@ -642,15 +637,7 @@
+         /* update all streamdirs */
+         else
+         {
+-            /* shoutcast */
+-            streamdir_t *streamdir = shoutcast_streamdir_fetch ();
+-            if (streamdir != NULL)
+-            {
+-                gdk_threads_enter ();
+-                if (sb_gui_widget)
+-                    streambrowser_win_set_streamdir (streamdir, SHOUTCAST_ICON);
+-                gdk_threads_leave ();
+-            }
++            streamdir_t *streamdir = NULL;
+             /* xiph */
+             streamdir = xiph_streamdir_fetch ();
+             if (streamdir != NULL)
diff --git a/audacious-plugins.spec b/audacious-plugins.spec
index 764d433..e4c3f41 100644
--- a/audacious-plugins.spec
+++ b/audacious-plugins.spec
@@ -10,7 +10,7 @@ Requires: audacious >= %{aud_ver}
 
 Name: audacious-plugins
 Version: 2.5.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Plugins for the Audacious audio player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -31,6 +31,10 @@ Patch0: audacious-plugins-2.5.2-xmms-skindir.patch
 Patch1: audacious-plugins-2.4-libdir.patch
 # fixed upstream AUDPLUG-380
 Patch3: audacious-plugins-2.5.2-m3u-eof.patch
+#
+Patch4: audacious-plugins-2.5.3-streambrowser.patch
+#
+Patch5: audacious-plugins-2.5.3-moodbar.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: gettext
@@ -156,6 +160,8 @@ providers may build it with libsidplay 2 instead.
 %patch0 -p1 -b .xmms-skindir
 %patch1 -p1 -b .libdir
 %patch3 -p1 -b .m3u-eof
+%patch4 -p1 -b .streambrowser
+%patch5 -p1 -b .moodbar
 
 for i in src/ladspa/ladspa.c
 do
@@ -270,6 +276,14 @@ update-desktop-database &> /dev/null || :
 
 
 %changelog
+* Wed Jul 13 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.5.3-2
+- Fix several issues and crashes in the moodbar plugin.
+- Fix file transport in the streambrowser plugin.
+- Warning:
+  Streambrowser has been removed from Audacious upstream (#718685)
+  due to several issues, such as race condition crashes and Shoutcast
+  support that no longer works.
+
 * Sun Jul  3 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.5.3-1
 - Update to 2.5.3 (merged patches).
 


More information about the scm-commits mailing list