aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder_control.c')
-rw-r--r--src/decoder_control.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/decoder_control.c b/src/decoder_control.c
index b934d516f..6d2efd0d7 100644
--- a/src/decoder_control.c
+++ b/src/decoder_control.c
@@ -102,8 +102,13 @@ dc_seek(struct notify *notify, double where)
}
void
-dc_quit(struct notify *notify)
+dc_quit(void)
{
+ assert(dc.thread != NULL);
+
dc.quit = true;
- dc_command(notify, DECODE_COMMAND_STOP);
+ dc_command_async(DECODE_COMMAND_STOP);
+
+ g_thread_join(dc.thread);
+ dc.thread = NULL;
}