diff options
author | Max Kellermann <max@duempel.org> | 2009-10-31 18:01:05 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-31 18:01:05 +0100 |
commit | 9eadb517da965b01929bdb7ce5c8f2911a9363db (patch) | |
tree | f3bb6cd9ef4fb6246482e301851ac974f71e39bd /src/player_thread.c | |
parent | 1ae4e4dcd3d8a8391f48ed3a551319477964a0c3 (diff) | |
download | mpd-9eadb517da965b01929bdb7ce5c8f2911a9363db.tar.gz mpd-9eadb517da965b01929bdb7ce5c8f2911a9363db.tar.xz mpd-9eadb517da965b01929bdb7ce5c8f2911a9363db.zip |
player_thread: simplified thread destruction
Simply use "return" instead of g_thread_exit().
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 6 |
1 files 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) |