#include <vlc_vlm.h>
+#include <assert.h>
+
/*****************************************************************************
* The evil global variables. We handle them with care, don't worry.
*****************************************************************************/
/* Initialize mutexes */
vlc_mutex_init( &priv->timer_lock );
vlc_mutex_init( &priv->config_lock );
-#ifdef __APPLE__
- vlc_thread_set_priority( p_libvlc, VLC_THREAD_PRIORITY_LOW );
-#endif
+
/* Store data for the non-reentrant API */
p_static_vlc = p_libvlc;
return VLC_EGENERIC;
}
+#ifdef __APPLE__
+ /* vlc_thread_set_priority needs to query the config,
+ * so this is the earliest moment where we can set this */
+ vlc_thread_set_priority( p_libvlc, VLC_THREAD_PRIORITY_LOW );
+#endif
+
/* Check for short help option */
if( config_GetInt( p_libvlc, "help" ) > 0 )
{
}
/* Set the config file stuff */
- p_libvlc->psz_homedir = config_GetHomeDir();
priv->psz_configfile = config_GetCustomConfigFile( p_libvlc );
/* Check for plugins cache options */
{
intf_thread_t * p_intf = NULL;
vout_thread_t * p_vout = NULL;
- aout_instance_t * p_aout = NULL;
libvlc_priv_t *priv = libvlc_priv (p_libvlc);
/* Ask the interfaces to stop and destroy them */
vout_Destroy( p_vout );
}
- /* Free audio outputs */
- msg_Dbg( p_libvlc, "removing all audio outputs" );
- while( (p_aout = vlc_object_find( p_libvlc, VLC_OBJECT_AOUT, FIND_CHILD )) )
- {
- vlc_object_detach( (vlc_object_t *)p_aout );
- vlc_object_release( (vlc_object_t *)p_aout );
- aout_Delete( p_aout );
- }
-
#ifdef ENABLE_SOUT
playlist_t * p_playlist;
sout_instance_t * p_sout;