# HG changeset patch # User nenolod # Date 1149793866 25200 # Node ID c01fe697066059cff3731cc56ec43286ab462673 # Parent e4eac9fa16140c8a5f99521ddb116223eb4c72d3 [svn] - remove an old hack that is no longer necessary (can cause a crash (!)) diff -r e4eac9fa1614 -r c01fe6970660 Plugins/Input/aac/src/libmp4.c --- a/Plugins/Input/aac/src/libmp4.c Thu Jun 08 11:34:43 2006 -0700 +++ b/Plugins/Input/aac/src/libmp4.c Thu Jun 08 12:11:06 2006 -0700 @@ -78,7 +78,6 @@ void audmp4_file_info_box(gchar *); gboolean buffer_playing; -gint doExit; InputPlugin mp4_ip = { @@ -173,7 +172,6 @@ static void mp4_play(char *filename) { buffer_playing = TRUE; - doExit = 0; decodeThread = g_thread_create((GThreadFunc)mp4Decode, g_strdup(filename), TRUE, NULL); return; } @@ -183,18 +181,8 @@ if(buffer_playing){ buffer_playing = FALSE; mp4_ip.output->close_audio(); + g_thread_join(decodeThread); } - - /* - * The problem is, we can't just go try to reap the thread, it probably - * won't work. This hint gives us points where the thread can just quit. - * Which basically serves the same function... - * - * - nenolod - */ - g_static_mutex_lock(&mutex); - doExit = 1; - g_static_mutex_unlock(&mutex); } static int mp4_IsOurFile(char *filename) @@ -433,21 +421,9 @@ /* Finish playing before we close the output. */ while ( mp4_ip.output->buffer_playing() ) { - if (doExit) - { - doExit = 0; - g_thread_exit(NULL); - } - xmms_usleep(10000); } - if (doExit) - { - doExit = 0; - g_thread_exit(NULL); - } - mp4_ip.output->flush(seekPosition*1000); mp4_ip.output->close_audio(); faacDecClose(decoder); @@ -477,12 +453,6 @@ return FALSE; } - if (doExit) - { - doExit = 0; - g_thread_exit(NULL); - } - sampleBuffer= faacDecDecode(decoder, &frameInfo, buffer,