Commit 9eadb517 authored by Max Kellermann's avatar Max Kellermann

player_thread: simplified thread destruction

Simply use "return" instead of g_thread_exit().
parent 1ae4e4dc
...@@ -744,6 +744,7 @@ static void do_play(void) ...@@ -744,6 +744,7 @@ static void do_play(void)
/* XXX race condition: check decoder again */ /* XXX race condition: check decoder again */
player_wait_decoder(); player_wait_decoder();
decoder_unlock(); decoder_unlock();
player_lock();
continue; continue;
} else { } else {
/* buffering is complete */ /* buffering is complete */
...@@ -920,8 +921,7 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) ...@@ -920,8 +921,7 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
music_buffer_free(player_buffer); music_buffer_free(player_buffer);
player_command_finished(); player_command_finished();
g_thread_exit(NULL); return NULL;
break;
case PLAYER_COMMAND_CANCEL: case PLAYER_COMMAND_CANCEL:
pc.next_song = NULL; pc.next_song = NULL;
...@@ -938,8 +938,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) ...@@ -938,8 +938,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
break; break;
} }
} }
return NULL;
} }
void player_create(void) void player_create(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment