[vlc-commits] commit: Call XInitThreads in non-1.1 Xlib-dependent plugins ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Apr 15 19:36:07 CEST 2010


vlc/vlc-1.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 15 20:35:41 2010 +0300| [e0675a7cfc3bfecb8df4259f72e0a192d0a314a7] | committer: Rémi Denis-Courmont 

Call XInitThreads in non-1.1 Xlib-dependent plugins

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

 modules/access/screen/x11.c        |    3 +++
 modules/video_filter/panoramix.c   |    1 +
 modules/video_output/omapfb.c      |    3 +++
 modules/video_output/x11/xcommon.c |    3 +++
 4 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/access/screen/x11.c b/modules/access/screen/x11.c
index 8723f15..2e21b19 100644
--- a/modules/access/screen/x11.c
+++ b/modules/access/screen/x11.c
@@ -45,6 +45,9 @@ int screen_InitCapture( demux_t *p_demux )
     XWindowAttributes win_info;
     int i_chroma;
 
+    if( !XInitThreads() )
+        return VLC_EGENERIC;
+
     /* Open the display */
     p_display = XOpenDisplay( psz_display );
     free( psz_display );
diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c
index 73c9281..4c7b1af 100644
--- a/modules/video_filter/panoramix.c
+++ b/modules/video_filter/panoramix.c
@@ -565,6 +565,7 @@ static int AdjustHeight( vout_thread_t *p_vout )
 #else
         char *psz_display = var_CreateGetNonEmptyString( p_vout,
                                                         "x11-display" );
+        XInitThreads(); /* XXX: should check return value */
         Display *p_display = XOpenDisplay( psz_display );
         free( psz_display );
         if (p_vout->p_sys->b_xinerama)
diff --git a/modules/video_output/omapfb.c b/modules/video_output/omapfb.c
index 95c2eaf..ea710de 100644
--- a/modules/video_output/omapfb.c
+++ b/modules/video_output/omapfb.c
@@ -190,6 +190,9 @@ static int Create( vlc_object_t *p_this )
         p_vout->fmt_in.i_chroma != VLC_FOURCC('Y','V','1','2') )
         return VLC_EGENERIC;
 
+    if( !XInitThreads() )
+        return VLC_EGENERIC;
+
     /* Allocate instance and initialize some members */
     p_vout->p_sys = p_sys = calloc( 1, sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c
index adc5e79..700d9a0 100644
--- a/modules/video_output/x11/xcommon.c
+++ b/modules/video_output/x11/xcommon.c
@@ -183,6 +183,9 @@ int Activate ( vlc_object_t *p_this )
     bool   b_chroma = 0;
 #endif
 
+    if( !XInitThreads() )
+        return VLC_EGENERIC;
+
     p_vout->pf_init = InitVideo;
     p_vout->pf_end = EndVideo;
     p_vout->pf_manage = ManageVideo;



More information about the vlc-commits mailing list