]> git.sesse.net Git - vlc/commitdiff
Pulse: uses Xlib, needs XInitThreads()
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 3 Mar 2010 19:27:15 +0000 (21:27 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 3 Mar 2010 19:27:29 +0000 (21:27 +0200)
configure.ac
modules/audio_output/pulse.c

index 206b2691c86cfcfa5d7b6de4b90646778854f6b6..8a060ab49466604c92498e1c49cbac57cebab8eb 100644 (file)
@@ -3784,6 +3784,7 @@ dnl
 dnl  Pulseaudio module
 dnl
 PKG_ENABLE_MODULES_VLC([PULSE], [], [libpulse >= 0.9.11], [Pulseaudio support], [auto])
+VLC_ADD_LIBS([pulse], [${X_LIBS} ${X_PRE_LIBS} -lX11])
 
 dnl
 dnl  Portaudio module
index c4580b62af14e71e8e25a23d3d1bf32b9b529cbc..adc32d636d2805868c6dc9792a32101e92df8c9c 100644 (file)
@@ -34,6 +34,9 @@
 #include <vlc_cpu.h>
 
 #include <pulse/pulseaudio.h>
+#ifdef HAVE_X11_XLIB_H
+# include <X11/Xlib.h>
+#endif
 
 #include <assert.h>
 
@@ -119,6 +122,10 @@ static int Open ( vlc_object_t *p_this )
     struct pa_buffer_attr a;
     struct pa_channel_map map;
 
+#ifdef HAVE_X11_XLIB_H
+    if( !XInitThreads() )
+        return VLC_EGENERIC;
+#endif
     /* Allocate structures */
     p_aout->output.p_sys = p_sys = calloc( 1, sizeof( aout_sys_t ) );
     if( p_sys == NULL )