mirror of https://github.com/mpv-player/mpv
cocoa: fix deadlock during initialization
Thanks to @wm4 for catching the bug. Fixes #405
This commit is contained in:
parent
76d771a6fa
commit
241cbe5065
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue