[vlc-commits] macosx: remove unneeded performSelectorOnMainThread

David Fuhrmann git at videolan.org
Sun Jun 29 23:26:08 CEST 2014


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jun 22 13:10:34 2014 +0200| [5cf60db6f749907e1a45618b075964650bc590a8] | committer: Jean-Baptiste Kempf

macosx: remove unneeded performSelectorOnMainThread

setActiveVideoPlayback is always called on the main thread nowadays..

(cherry picked from commit f737f942a5ace4cab4fb165b1eaeff8f036395fa)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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