[vlc-commits] macosx: make sure we update the menu from the main thread only (fixes #5737 )

Felix Paul Kühne git at videolan.org
Fri Jan 6 20:09:19 CET 2012


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan  6 19:39:36 2012 +0100| [b959bf6c6e541697ec558eadd13ea36dbba644fa] | committer: Jean-Baptiste Kempf

macosx: make sure we update the menu from the main thread only (fixes #5737)
(cherry picked from commit 8e3953e5508260bba516c09836fe44a180d0ef22)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/macosx/intf.m |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f4c686d..0256e1c 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -259,7 +259,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             break;
         case INPUT_EVENT_TITLE:
         case INPUT_EVENT_CHAPTER:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             break;
         case INPUT_EVENT_CACHE:
             [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
@@ -277,7 +277,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             break;
         case INPUT_EVENT_ITEM_META:
         case INPUT_EVENT_ITEM_INFO:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             [[VLCMain sharedInstance] updateName];
             [[VLCMain sharedInstance] updateInfoandMetaPanel];
             break;
@@ -287,7 +287,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             [[VLCMain sharedInstance] updateRecordState: var_GetBool( p_this, "record" )];
             break;
         case INPUT_EVENT_PROGRAM:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             break;
         case INPUT_EVENT_ITEM_EPG:
             break;



More information about the vlc-commits mailing list