From 9eadb517da965b01929bdb7ce5c8f2911a9363db Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 31 Oct 2009 18:01:05 +0100 Subject: [PATCH] player_thread: simplified thread destruction Simply use "return" instead of g_thread_exit(). --- src/player_thread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/player_thread.c b/src/player_thread.c index 0c88d1a5c..3e822e280 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -744,6 +744,7 @@ static void do_play(void) /* XXX race condition: check decoder again */ player_wait_decoder(); decoder_unlock(); + player_lock(); continue; } else { /* buffering is complete */ @@ -920,8 +921,7 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) music_buffer_free(player_buffer); player_command_finished(); - g_thread_exit(NULL); - break; + return NULL; case PLAYER_COMMAND_CANCEL: pc.next_song = NULL; @@ -938,8 +938,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) break; } } - - return NULL; } void player_create(void)