[vlc-commits] commit: Pulse: uses Xlib, needs XInitThreads() ( Rémi Denis-Courmont )

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


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

Pulse: uses Xlib, needs XInitThreads()

(cherry picked from commit b64885ef2fadbc5360d0ff839cd0793cb194dc54)

Conflicts:

	configure.ac

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

 configure.ac                 |    2 +-
 modules/audio_output/pulse.c |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9dba497..5f592e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4752,7 +4752,7 @@ AC_ARG_ENABLE(pulse,
      PKG_CHECK_MODULES(PULSE, libpulse >= 0.9.11,
        [ VLC_ADD_PLUGIN([pulse])
         VLC_ADD_CFLAGS([pulse],[${PULSE_CFLAGS}])
-        VLC_ADD_LDFLAGS([pulse],[${PULSE_LIBS}])],
+        VLC_ADD_LDFLAGS([pulse],[${PULSE_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11])],
        [AC_MSG_WARN(pulseaudio library not found)])
    fi
 
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 2aae912..543b012 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -33,6 +33,9 @@
 #include <vlc_aout.h>
 
 #include <pulse/pulseaudio.h>
+#ifdef HAVE_X11_XLIB_H
+# include <X11/Xlib.h>
+#endif
 
 #include <assert.h>
 
@@ -118,6 +121,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