#include <vlc_cpu.h>
#include <pulse/pulseaudio.h>
+#ifdef HAVE_X11_XLIB_H
+# include <X11/Xlib.h>
+#endif
#include <assert.h>
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 )