summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_application.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index 008622f3ea..39800dbbb6 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -273,11 +273,10 @@ static void *playback_thread(void *ctx_obj)
mpthread_set_name("playback core (OSX)");
@autoreleasepool {
struct playback_thread_ctx *ctx = (struct playback_thread_ctx*) ctx_obj;
- ctx->mpv_main(*ctx->argc, *ctx->argv);
+ int r = ctx->mpv_main(*ctx->argc, *ctx->argv);
terminate_cocoa_application();
- // normally never reached
- cocoa_stop_runloop();
- pthread_exit(NULL);
+ // normally never reached - unless the cocoa mainloop hasn't started yet
+ exit(r);
}
}