# HG changeset patch # User nenolod # Date 1147467830 25200 # Node ID c9e641ff4a286ff986043429e8fb8877a4eea2ab # Parent 2ed9643e968be1d11c9409af4e1ecd837287a3f9 [svn] - threading cleanups, we no longer need to be mutexlocked 90% of the time, and we shouldn't have been joining in stop(), as the thread will likely already be joined, and if not, it will be reaped later diff -r 2ed9643e968b -r c9e641ff4a28 Plugins/Input/aac/src/libmp4.c --- a/Plugins/Input/aac/src/libmp4.c Fri May 12 13:47:25 2006 -0700 +++ b/Plugins/Input/aac/src/libmp4.c Fri May 12 14:03:50 2006 -0700 @@ -180,7 +180,6 @@ { if(buffer_playing){ buffer_playing = FALSE; - g_thread_join(decodeThread); mp4_ip.output->close_audio(); } } @@ -428,7 +427,10 @@ mp4_ip.output->close_audio(); faacDecClose(decoder); + g_static_mutex_lock(&mutex); buffer_playing = FALSE; + g_static_mutex_unlock(&mutex); + g_thread_exit(NULL); return FALSE; } @@ -666,6 +668,7 @@ g_static_mutex_lock(&mutex); seekPosition= -1; buffer_playing= TRUE; + g_static_mutex_unlock(&mutex); mp4file= mp4ff_open_read(mp4cb); if( !mp4file ) { @@ -682,6 +685,7 @@ g_free(args); vfs_fclose(mp4fh); + g_static_mutex_lock(&mutex); buffer_playing = FALSE; g_static_mutex_unlock(&mutex); g_thread_exit(NULL);