/* Now that the thread system is initialized, we don't have much, but
* at least we have variables */
vlc_mutex_t *lock = var_AcquireMutex( "libvlc" );
- if( !p_libvlc_global->b_ready )
+ if( i_instances == 0 )
{
/* Guess what CPU we have */
cpu_flags = CPUCapabilities();
/* The module bank will be initialized later */
p_libvlc_global->p_module_bank = NULL;
-
- p_libvlc_global->b_ready = true;
}
/* Allocate a libvlc instance object */
{
VLC_COMMON_MEMBERS
- bool b_ready; ///< Initialization boolean
-
/* Object structure data */
int i_counter; ///< object counter
int i_objects; ///< Attached objects count
}
/* We should be safe now. Do all the initialization stuff we want. */
- p_root->b_ready = false;
vlc_threadvar_create( p_root, &msg_context_global_key );
}
i_initializations++;