aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder_thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 12449237f..97555f44d 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -258,8 +258,10 @@ static gpointer decoder_task(G_GNUC_UNUSED gpointer arg)
void decoder_thread_start(void)
{
GError *e = NULL;
- GThread *t;
- if (!(t = g_thread_create(decoder_task, NULL, FALSE, &e)))
+ assert(dc.thread == NULL);
+
+ dc.thread = g_thread_create(decoder_task, NULL, true, &e);
+ if (dc.thread == NULL)
FATAL("Failed to spawn decoder task: %s\n", e->message);
}