[vlc-commits] macosx: run on first thread directly, like already done by Qt4

Rémi Denis-Courmont git at videolan.org
Mon May 7 18:58:20 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May  7 19:57:10 2012 +0300| [2a21d76d32e4ca9549ea7872ddb570ef73b2616c] | committer: Rémi Denis-Courmont

macosx: run on first thread directly, like already done by Qt4

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

 modules/gui/macosx/intf.m         |    6 ++++--
 modules/gui/minimal_macosx/intf.m |    5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 90f7c6c..fedebd0 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -43,6 +43,7 @@
 #include <vlc_aout_intf.h>
 #include <vlc_vout_window.h>
 #include <unistd.h> /* execl() */
+#include "../../../lib/libvlc_internal.h"
 
 #import "CompatibilityFixes.h"
 #import "intf.h"
@@ -107,10 +108,11 @@ int OpenIntf ( vlc_object_t *p_this )
 
     /* subscribe to LibVLCCore's messages */
     vlc_Subscribe( &p_intf->p_sys->sub, MsgCallback, NULL );
-    p_intf->pf_run = Run;
-    p_intf->b_should_run_on_first_thread = true;
 
     [o_pool release];
+
+    libvlc_SetExitHandler( p_libvlc, vlc_object_kill, p_intf );
+    Run( p_intf );
     return VLC_SUCCESS;
 }
 
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index b9a13ef..a79189c 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -40,6 +40,7 @@
 
 #include <vlc_input.h>
 #import <vlc_interface.h>
+#include "../../../lib/libvlc_internal.h"
 
 #import <intf.h>
 
@@ -63,8 +64,8 @@ int OpenIntf ( vlc_object_t *p_this )
 
     memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
 
-    p_intf->pf_run = Run;
-    p_intf->b_should_run_on_first_thread = true;
+    libvlc_SetExitHandler( p_libvlc, vlc_object_kill, p_intf );
+    Run( p_intf );
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list