#ifdef Q_WS_X11
static char *x11_display = NULL;
#endif
+static vlc_mutex_t lock = VLC_STATIC_MUTEX;
/*****************************************************************************
* Module callbacks
putenv( (char *)"XLIB_SKIP_ARGB_VISUALS=1" );
#endif
+ if (vlc_mutex_trylock (&lock))
+ {
+ msg_Err (p_this, "cannot start Qt4 multiple times");
+ return VLC_EGENERIC;
+ }
+
/* Allocations of p_sys */
intf_sys_t *p_sys = p_intf->p_sys = new intf_sys_t;
p_intf->p_sys->b_isDialogProvider = isDialogProvider;
if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
{
delete p_sys;
+ vlc_mutex_unlock (&lock);
return VLC_ENOMEM;
}
vlc_join (p_sys->thread, NULL);
delete p_sys;
+ vlc_mutex_unlock (&lock);
#ifdef Q_WS_X11
free (x11_display);
#endif