cocoa: fix deadlock during initialization

Thanks to @wm4 for catching the bug.

Fixes #405
This commit is contained in:
Stefano Pigozzi 2014-02-13 13:01:51 +01:00 committed by wm4
parent 76d771a6fa
commit 241cbe5065
1 changed files with 2 additions and 1 deletions

View File

@ -330,7 +330,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();