[arch-commits] Commit in audacious/trunk (3 files)

Ionut Biru ibiru at archlinux.org
Sun Mar 28 14:54:56 CEST 2010


    Date: Sunday, March 28, 2010 @ 08:54:56
  Author: ibiru
Revision: 73760

upgpkg: audacious 2.2-5
fixing album art and segfault when playing livestream, patches from fedora cvs, FS#17783, FS#18616

Added:
  audacious/trunk/audacious-2.2-coverart-2.patch
  audacious/trunk/audacious-2.2-set_tuple_cb.patch
Modified:
  audacious/trunk/PKGBUILD

----------------------------------+
 PKGBUILD                         |   12 ++++-
 audacious-2.2-coverart-2.patch   |   79 +++++++++++++++++++++++++++++++++++++
 audacious-2.2-set_tuple_cb.patch |   62 +++++++++++++++++++++++++++++
 3 files changed, 150 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-03-28 10:54:22 UTC (rev 73759)
+++ PKGBUILD	2010-03-28 12:54:56 UTC (rev 73760)
@@ -4,7 +4,7 @@
 
 pkgname=audacious
 pkgver=2.2
-pkgrel=4
+pkgrel=5
 pkgdesc="Media player based on BMP"
 arch=('i686' 'x86_64')
 url="http://audacious-media-player.org/"
@@ -14,11 +14,17 @@
 provides=('audacious-player')
 replaces=('audacious-player')
 install=audacious.install
-source=(http://distfiles.atheme.org/$pkgname-$pkgver.tgz)
-md5sums=('ad0f7484692c529acfa91ce784170478')
+source=(http://distfiles.atheme.org/$pkgname-$pkgver.tgz 
+	audacious-2.2-coverart-2.patch
+	audacious-2.2-set_tuple_cb.patch)
+md5sums=('ad0f7484692c529acfa91ce784170478'
+         'd659c93402ec3ea326854590aceab7c7'
+         'ac9bbbd4c8b4bb39cbfa6ef579708528')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
+  patch -Np1 -i $srcdir/audacious-2.2-coverart-2.patch || return 1
+  patch -Np1 -i $srcdir/audacious-2.2-set_tuple_cb.patch || return 1
 
   if [[ $CARCH == "i686" ]]; then
     ./configure --prefix=/usr \

Added: audacious-2.2-coverart-2.patch
===================================================================
--- audacious-2.2-coverart-2.patch	                        (rev 0)
+++ audacious-2.2-coverart-2.patch	2010-03-28 12:54:56 UTC (rev 73760)
@@ -0,0 +1,79 @@
+diff -Nur audacious-2.2-orig/src/audacious/ui_albumart.c audacious-2.2/src/audacious/ui_albumart.c
+--- audacious-2.2-orig/src/audacious/ui_albumart.c	2009-11-22 23:43:47.000000000 +0100
++++ audacious-2.2/src/audacious/ui_albumart.c	2010-03-06 19:24:16.000000000 +0100
+@@ -123,6 +123,8 @@
+ {
+ 	GDir *d;
+ 
++    if (!path)
++        return NULL;
+ 	if (cfg.recurse_for_cover && depth > cfg.recurse_for_cover_depth)
+ 		return NULL;
+ 
+diff -Nur audacious-2.2-orig/src/audacious/ui_fileinfo.c audacious-2.2/src/audacious/ui_fileinfo.c
+--- audacious-2.2-orig/src/audacious/ui_fileinfo.c	2009-11-22 23:43:47.000000000 +0100
++++ audacious-2.2/src/audacious/ui_fileinfo.c	2010-03-06 19:24:16.000000000 +0100
+@@ -790,7 +790,7 @@
+ fileinfo_show_for_tuple(Tuple *tuple, gboolean updating_enabled)
+ {
+     gchar *tmp = NULL;
+-    GdkPixbuf *icon = NULL;
++    GdkPixbuf *icon = NULL, *localpath = NULL;
+     GtkTreeIter iter;
+     GtkListStore *store;
+     mowgli_dictionary_iteration_state_t state;
+@@ -849,9 +849,11 @@
+         g_object_unref(icon);
+     }
+ 
++    localpath = g_filename_from_uri( tuple_get_string(tuple, FIELD_FILE_PATH, NULL), NULL, NULL );
+     tmp = fileinfo_recursive_get_image(
+-            tuple_get_string(tuple, FIELD_FILE_PATH, NULL),
++            localpath,
+             tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
++    g_free(localpath);
+ 
+     if (tmp) {
+         fileinfo_entry_set_image(image_artwork, tmp);
+diff -Nur audacious-2.2-orig/src/audacious/ui_fileinfopopup.c audacious-2.2/src/audacious/ui_fileinfopopup.c
+--- audacious-2.2-orig/src/audacious/ui_fileinfopopup.c	2009-11-22 23:43:47.000000000 +0100
++++ audacious-2.2/src/audacious/ui_fileinfopopup.c	2010-03-06 19:26:09.000000000 +0100
+@@ -340,6 +340,7 @@
+     gchar *last_artwork;
+     const static gchar default_artwork[] = DATA_DIR "/images/audio.png";
+     gint length;
++    const gchar *fpath, *fname;
+ 
+     last_artwork =
+         g_object_get_data(G_OBJECT(filepopup_win), "last_artwork");
+@@ -352,11 +353,16 @@
+         tmp = NULL;
+         g_object_set_data(G_OBJECT(filepopup_win), "file", NULL);
+     }
+-    if (tuple_get_string(tuple, FIELD_FILE_PATH, NULL) && tuple_get_string(tuple, FIELD_FILE_NAME, NULL))
++    fpath = tuple_get_string(tuple, FIELD_FILE_PATH, NULL);
++    fname = tuple_get_string(tuple, FIELD_FILE_NAME, NULL);
++    if (fpath && fname)
+         g_object_set_data(G_OBJECT(filepopup_win), "file",
+-                          g_build_filename(tuple_get_string(tuple, FIELD_FILE_PATH, NULL),
+-                                           tuple_get_string(tuple, FIELD_FILE_NAME, NULL),
++                          g_build_filename(fpath,fname,
+                                            NULL));
++    else {
++        if (!tuple_get_string(tuple, FIELD_TITLE, NULL))
++            return;
++    }
+ 
+     gtk_widget_realize(filepopup_win);
+ 
+@@ -408,7 +414,9 @@
+     g_free(track_string);
+ 
+     if (tuple_get_string(tuple, FIELD_FILE_NAME, NULL) && tuple_get_string(tuple, FIELD_FILE_PATH, NULL)) {
+-        tmp = fileinfo_recursive_get_image(tuple_get_string(tuple, FIELD_FILE_PATH, NULL), tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
++        gchar *localpath = g_filename_from_uri( tuple_get_string(tuple, FIELD_FILE_PATH, NULL), NULL, NULL );
++        tmp = fileinfo_recursive_get_image( localpath, tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
++        g_free(localpath);
+         if (tmp) { // picture found
+             if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture
+                 filepopup_entry_set_image(filepopup_win, "image_artwork", tmp);

Added: audacious-2.2-set_tuple_cb.patch
===================================================================
--- audacious-2.2-set_tuple_cb.patch	                        (rev 0)
+++ audacious-2.2-set_tuple_cb.patch	2010-03-28 12:54:56 UTC (rev 73760)
@@ -0,0 +1,62 @@
+diff -Nur audacious-2.2-orig/src/audacious/playback.c audacious-2.2/src/audacious/playback.c
+--- audacious-2.2-orig/src/audacious/playback.c	2009-11-22 23:43:47.000000000 +0100
++++ audacious-2.2/src/audacious/playback.c	2010-01-28 13:52:03.000000000 +0100
+@@ -614,8 +614,10 @@
+ 
+ static void set_tuple (InputPlayback * playback, Tuple * tuple)
+ {
++    Tuple* copy = tuple_copy(tuple);
++    tuple_free(tuple);
+     /* playlist_entry_set_tuple must execute in main thread */
+-    g_timeout_add (0, set_tuple_cb, tuple);
++    g_timeout_add (0, set_tuple_cb, copy);
+ }
+ 
+ void ip_set_info (const gchar * title, gint length, gint bitrate, gint
+diff -Nur audacious-2.2-orig/src/libaudcore/tuple.c audacious-2.2/src/libaudcore/tuple.c
+--- audacious-2.2-orig/src/libaudcore/tuple.c	2009-11-22 23:43:47.000000000 +0100
++++ audacious-2.2/src/libaudcore/tuple.c	2010-01-29 01:41:29.000000000 +0100
+@@ -234,6 +234,7 @@
+     if (src == NULL) return NULL;
+ 
+     res = mowgli_heap_alloc(tuple_value_heap);
++    res->type = src->type;
+     switch (src->type) {
+     case TUPLE_STRING:
+         res->value.string = stringpool_get(src->value.string);
+@@ -242,6 +243,7 @@
+         res->value.integer = src->value.integer;
+         break;
+     default:
++        mowgli_heap_free(tuple_value_heap, res);
+         return NULL;
+     }
+     return res;
+@@ -257,8 +259,8 @@
+ tuple_copy(const Tuple *src)
+ {
+     Tuple *dst;
++    TupleValue *tv;
+     mowgli_dictionary_iteration_state_t state;
+-    mowgli_dictionary_elem_t *elem;
+     gint i;
+ 
+     TUPLE_LOCK_WRITE();
+@@ -270,11 +272,13 @@
+         dst->values[i] = tuple_copy_value(src->values[i]);
+ 
+     /* Copy dictionary contents */
+-    MOWGLI_DICTIONARY_FOREACH(elem, &state, src->dict)
++    MOWGLI_DICTIONARY_FOREACH(tv, &state, src->dict)
+     {
+-        TupleValue *value = tuple_copy_value(elem->data);
+-        if (value != NULL && elem->key != NULL)
+-            mowgli_dictionary_add(dst->dict, elem->key, value);
++        gchar *key = state.cur->key;
++        TupleValue *value = tuple_copy_value(tv);
++        if (value != NULL && key != NULL) {
++            mowgli_dictionary_add(dst->dict, key, value);
++        }
+     }
+ 
+     /* Copy subtune number information */



More information about the arch-commits mailing list