[vlc-commits] commit: Pulse: uses Xlib, needs XInitThreads() ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Mar 3 20:35:47 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 3 21:27:15 2010 +0200| [b64885ef2fadbc5360d0ff839cd0793cb194dc54] | committer: Rémi Denis-Courmont
Pulse: uses Xlib, needs XInitThreads()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b64885ef2fadbc5360d0ff839cd0793cb194dc54
---
configure.ac | 1 +
modules/audio_output/pulse.c | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 206b269..8a060ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index c4580b6..adc32d6 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -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 )
More information about the vlc-commits
mailing list