mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
cocoa: perform init and uninit synchronously
This is slightly safer and without the resize redraw, should not cause any deadlock.
This commit is contained in:
parent
63f103e05d
commit
a0ac8b6331
@ -95,9 +95,7 @@ static void with_cocoa_lock(struct vo *vo, void(^block)(void))
|
|||||||
|
|
||||||
static void with_cocoa_lock_on_main_thread(struct vo *vo, void(^block)(void))
|
static void with_cocoa_lock_on_main_thread(struct vo *vo, void(^block)(void))
|
||||||
{
|
{
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_sync(dispatch_get_main_queue(), block);
|
||||||
with_cocoa_lock(vo, block);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void queue_new_video_size(struct vo *vo, int w, int h)
|
static void queue_new_video_size(struct vo *vo, int w, int h)
|
||||||
|
Loading…
Reference in New Issue
Block a user