mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-28 23:09:59 +02:00
Pulse: uses Xlib, needs XInitThreads()
This commit is contained in:
parent
e05d34f19d
commit
b64885ef2f
@ -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
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user