cocoa: fix deadlock during initialization

Thanks to @wm4 for catching the bug.

Fixes #405
This commit is contained in:
Stefano Pigozzi committed 2014-02-13 13:01:51 +01:00
1 parent 55f4b592d1
commit 20fa191adb
1 file changed
+2 -1
+2 -1
View File
@@ -323,7 +323,8 @@ int cocoa_main(mpv_main_fn mpv_main, int argc, char *argv[])
pthread_create(&playback_thread_id, NULL, playback_thread, &ctx);
[mpv_shared_app().input_ready lock];
[mpv_shared_app().input_ready wait];
while (!mpv_shared_app().inputContext)
[mpv_shared_app().input_ready wait];
[mpv_shared_app().input_ready unlock];
cocoa_run_runloop();