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 */