mirror of
https://github.com/mpv-player/mpv
synced 2025-02-04 14:11:53 +00:00
cocoa: fix deadlock during initialization
Thanks to @wm4 for catching the bug. Fixes #405
This commit is contained in:
parent
55f4b592d1
commit
20fa191adb
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user