[vlc-commits] macosx: remove unneeded performSelectorOnMainThread

David Fuhrmann git at videolan.org
Sun Jun 22 13:41:14 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jun 22 13:10:34 2014 +0200| [f737f942a5ace4cab4fb165b1eaeff8f036395fa] | committer: David Fuhrmann

macosx: remove unneeded performSelectorOnMainThread

setActiveVideoPlayback is always called on the main thread nowadays..

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f737f942a5ace4cab4fb165b1eaeff8f036395fa
---

 modules/gui/macosx/intf.m |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 6c12719..0fca5ba 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1554,13 +1554,15 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (void)setActiveVideoPlayback:(BOOL)b_value
 {
+    assert([NSThread isMainThread]);
+
     b_active_videoplayback = b_value;
     if (o_mainwindow) {
-        [o_mainwindow performSelectorOnMainThread:@selector(setVideoplayEnabled) withObject:nil waitUntilDone:YES];
+        [o_mainwindow setVideoplayEnabled];
     }
 
     // update sleep blockers
-    [self performSelectorOnMainThread:@selector(playbackStatusUpdated) withObject:nil waitUntilDone:NO];
+    [self playbackStatusUpdated];
 }
 
 #pragma mark -



More information about the vlc-commits mailing list