diff options
Diffstat (limited to 'player/scripting.c')
-rw-r--r-- | player/scripting.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/player/scripting.c b/player/scripting.c index 962a5e815f..0b200815f1 100644 --- a/player/scripting.c +++ b/player/scripting.c @@ -98,8 +98,6 @@ static void run_script(struct mp_script_args *arg) static MP_THREAD_VOID script_thread(void *p) { - pthread_detach(mp_thread_self()); - struct mp_script_args *arg = p; run_script(arg); @@ -198,6 +196,7 @@ static int64_t mp_load_script(struct MPContext *mpctx, const char *fname) talloc_free(arg); return -1; } + mp_thread_detach(thread); } return id; |