changeset 3185:c87dfbb3711e trunk

another damn merge
author Cristi Magherusan <majeru@atheme-project.org>
date Sat, 28 Jul 2007 01:38:07 +0300
parents 564359ff9304 (current diff) 06d89ea93859 (diff)
children e7bbf59b81ae 1fef0ac7395e
files
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playback.c	Sat Jul 28 01:28:48 2007 +0300
+++ b/src/audacious/playback.c	Sat Jul 28 01:38:07 2007 +0300
@@ -193,6 +193,9 @@
         if (playback->plugin->stop)
             playback->plugin->stop(playback);
 
+        if (playback->thread != NULL)
+            g_thread_join(playback->thread);
+
         free_vis_data();
         ip_data.paused = FALSE;
 
@@ -243,6 +246,7 @@
     playback->plugin = entry->decoder;
     playback->output = &psuedo_output_plugin;
     playback->filename = g_strdup(entry->filename);
+    playback->thread = g_thread_self();
     
     set_current_input_playback(playback);
 
@@ -253,6 +257,8 @@
     else if (playback->error)
         playback_error();
 
+    playback->thread = NULL;
+    g_thread_exit(NULL);
     return NULL;
 }
 
--- a/src/audacious/plugin.h	Sat Jul 28 01:28:48 2007 +0300
+++ b/src/audacious/plugin.h	Sat Jul 28 01:38:07 2007 +0300
@@ -191,6 +191,8 @@
     int playing;
     gboolean error;
     gboolean eof;
+
+    GThread *thread;
 };
 
 struct _InputPlugin {