changeset 1350:1e36cc6c4b23

Automated merge with ssh://hg.atheme-project.org//hg/audacious-plugins
author Calin Crisan ccrisan@gmail.com
date Tue, 24 Jul 2007 01:46:09 +0300
parents ab387ad5b88e (current diff) d427f353e326 (diff)
children 0428dcce1d45
files
diffstat 3 files changed, 10 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/src/libmp4.c	Tue Jul 24 01:42:58 2007 +0300
+++ b/src/aac/src/libmp4.c	Tue Jul 24 01:46:09 2007 +0300
@@ -125,7 +125,8 @@
 {
     buffer_playing = TRUE;
     playback->playing = 1; //XXX should acquire lock?
-    decodeThread = g_thread_create((GThreadFunc)mp4_decode, playback, TRUE, NULL);
+    decodeThread = g_thread_self();
+    mp4_decode(playback);
 }
 
 static void mp4_stop(InputPlayback *playback)
@@ -593,8 +594,6 @@
             buffer_playing = FALSE;
             playback->playing = 0;
             g_static_mutex_unlock(&mutex);
-            g_thread_exit(NULL);
-
             return FALSE;
         }
         rc= mp4ff_read_sample(mp4file, mp4track,
@@ -675,7 +674,7 @@
         buffer_playing = FALSE;
         playback->playing = 0;
         g_static_mutex_unlock(&mutex);
-        g_thread_exit(NULL);
+        return;
     }
     if((buffervalid = vfs_fread(streambuffer, 1, BUFFER_SIZE, file))==0){
         g_print("AAC: Error reading file\n");
@@ -684,7 +683,7 @@
         playback->playing = 0;
         faacDecClose(decoder);
         g_static_mutex_unlock(&mutex);
-        g_thread_exit(NULL);
+        return;
     }
     if(!strncmp((char*)streambuffer, "ID3", 3)){
         gint size = 0;
@@ -733,7 +732,7 @@
         buffer_playing = FALSE;
         playback->playing = 0;
         g_static_mutex_unlock(&mutex);
-        g_thread_exit(NULL);
+        return;
     }
 
     mp4_ip.set_info(xmmstitle, -1, -1, samplerate, channels);
@@ -827,7 +826,6 @@
     buffer_playing = FALSE;
     playback->playing = 0;
     g_static_mutex_unlock(&mutex);
-    g_thread_exit(NULL);
 }
 
 static void *mp4_decode( void *args )
@@ -848,7 +846,7 @@
     g_static_mutex_unlock(&mutex);
 
     if (mp4fh == NULL)
-        g_thread_exit(NULL);
+        return NULL;
 
     ret = parse_aac_stream(mp4fh);
 
--- a/src/alac/plugin.c	Tue Jul 24 01:42:58 2007 +0300
+++ b/src/alac/plugin.c	Tue Jul 24 01:46:09 2007 +0300
@@ -179,7 +179,8 @@
     char *filename = data->filename;
     going = 1;
     playback = data;
-    playback_thread = g_thread_create(decode_thread, filename, TRUE, NULL);
+    playback_thread = g_thread_self();
+    decode_thread(filename);
 }
 
 static void stop(InputPlayback * data)
--- a/src/console/Audacious_Driver.cxx	Tue Jul 24 01:42:58 2007 +0300
+++ b/src/console/Audacious_Driver.cxx	Tue Jul 24 01:46:09 2007 +0300
@@ -310,8 +310,6 @@
 	playback->output->close_audio();
 	console_ip_is_going = 0;
 	g_static_mutex_unlock( &playback_mutex );
-	// TODO: should decode_thread be cleared here?
-	g_thread_exit( NULL );
 	return NULL;
 }
 
@@ -396,7 +394,8 @@
 	
 	pending_seek = -1;
 	console_ip_is_going = 1;
-	decode_thread = g_thread_create( play_loop_track, playback, TRUE, NULL );
+	decode_thread = g_thread_self();
+        play_loop_track( playback );
 }
 
 static void seek( InputPlayback * data, gint time )