From a0ac8b6331d345748d415cf71affbe7a90e336a6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 16 Oct 2014 13:57:41 +0200 Subject: cocoa: perform init and uninit synchronously This is slightly safer and without the resize redraw, should not cause any deadlock. --- video/out/cocoa_common.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 537388ffd9..655c740169 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -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)) { - dispatch_async(dispatch_get_main_queue(), ^{ - with_cocoa_lock(vo, block); - }); + dispatch_sync(dispatch_get_main_queue(), block); } static void queue_new_video_size(struct vo *vo, int w, int h) -- cgit v1.2.3