0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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
parent 55f4b592d1
commit 20fa191adb

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();