- va_start( args, psz_format );
- vasprintf( &p_exception->psz_message, psz_format, args );
- va_end( args );
+ p_new->p_libvlc_int = p_libvlc_int;
+ p_new->libvlc_vlm.p_vlm = NULL;
+ p_new->libvlc_vlm.p_event_manager = NULL;
+ p_new->libvlc_vlm.pf_release = NULL;
+ p_new->ref_count = 1;
+ p_new->verbosity = 1;
+ p_new->p_callback_list = NULL;
+ vlc_mutex_init(&p_new->instance_lock);
+ return p_new;
+
+error:
+ libvlc_deinit_threads ();
+ free (p_new);
+ return NULL;
+}
+
+void libvlc_retain( libvlc_instance_t *p_instance )
+{
+ assert( p_instance != NULL );
+ assert( p_instance->ref_count < UINT_MAX );