From bf80c03b0e531988685d5f6b00acaed9bc033394 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: May 01 2009 17:44:36 +0000 Subject: - Fix for "segfault with no playlist present" (BZ#475691) - Fix for broken playlist handling (BZ#475691), patch from http://launchpadlibrarian.net/19179891/audacious_1.5.1-3ubuntu1.1.debdi ff --- diff --git a/audacious-1.5.1-playlist-length.patch b/audacious-1.5.1-playlist-length.patch new file mode 100644 index 0000000..a0c9c7b --- /dev/null +++ b/audacious-1.5.1-playlist-length.patch @@ -0,0 +1,13 @@ +diff -uNr audacious-1.5.1-orig/src/audacious/playlist.c audacious-1.5.1/src/audacious/playlist.c +--- audacious-1.5.1-orig/src/audacious/playlist.c 2008-05-24 00:00:34.000000000 +0200 ++++ audacious-1.5.1/src/audacious/playlist.c 2009-05-01 19:29:17.663254934 +0200 +@@ -1531,6 +1531,9 @@ + gint + playlist_get_length(Playlist *playlist) + { ++ ++ g_return_val_if_fail(playlist != NULL, 0); ++ + return g_list_length(playlist->entries); + } + diff --git a/audacious-1.5.1-playlist-play-clicked.patch b/audacious-1.5.1-playlist-play-clicked.patch new file mode 100644 index 0000000..0ef9ca1 --- /dev/null +++ b/audacious-1.5.1-playlist-play-clicked.patch @@ -0,0 +1,43 @@ +--- a/src/audacious/main.c Sun May 25 15:12:17 2008 +0200 ++++ b/src/audacious/main.c Thu May 29 01:03:13 2008 +0300 +@@ -315,7 +315,7 @@ parse_cmd_line_options(gint *argc, gchar + } + + static void +-handle_cmd_line_options() ++handle_cmd_line_options(gboolean skip) + { + gchar **filenames = options.filenames; + #ifdef USE_DBUS +@@ -430,7 +430,7 @@ handle_cmd_line_options() + } /* is_running */ + else + #endif +- { /* !is_running */ ++ if (!skip) { /* !is_running */ + if (filenames != NULL) + { + gint pos = 0; +@@ -715,7 +715,7 @@ main(gint argc, gchar ** argv) + + signal_handlers_init(); + +- handle_cmd_line_options(); ++ handle_cmd_line_options(TRUE); + + if (options.headless == FALSE) + { +@@ -734,6 +734,8 @@ main(gint argc, gchar ** argv) + + plugin_system_init(); + playlist_system_init(); ++ ++ handle_cmd_line_options(FALSE); + + #ifdef USE_DBUS + init_dbus(); + + + + + diff --git a/audacious.spec b/audacious.spec index 0ea8299..73bebe1 100644 --- a/audacious.spec +++ b/audacious.spec @@ -2,7 +2,7 @@ Name: audacious Version: 1.5.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A GTK2 based media player similar to xmms Group: Applications/Multimedia @@ -21,6 +21,8 @@ Patch6: audacious-1.2.1-shaded-skin.patch # Patch8: audacious-1.1.1-playlist-twenty.patch Patch9: audacious-1.4.2-id3tag-close-file.patch Patch10: audacious-1.5.1-libsad-header.patch +Patch11: audacious-1.5.1-playlist-length.patch +Patch12: audacious-1.5.1-playlist-play-clicked.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel >= 2.6 @@ -119,6 +121,12 @@ Development files for Audacious # Remove libSAD references from the public headers %patch10 -p1 -b libsad-header +# Fix segfaults if no playlist exists +%patch11 -p1 -b playlist-length + +# When passing a file on the command line, play the file, not the first playlist entry +%patch12 -p1 -b playlist-play-clicked + perl -pi -e 's/^\.SILENT:.*$//' buildsys.mk.in %build @@ -207,6 +215,11 @@ fi %changelog +* Fri May 01 2009 Ralf Ertzinger 1.5.1-8 +- Fix for "segfault with no playlist present" (BZ#475691) +- Fix for broken playlist handling (BZ#475691), patch from + http://launchpadlibrarian.net/19179891/audacious_1.5.1-3ubuntu1.1.debdiff + * Sun Apr 12 2009 Matthias Saou 1.5.1-7 - Add "xmms-gui" provides, to be required from xmms-skins package (#470135).