]> git.sesse.net Git - vlc/commitdiff
control/media_instance.c: Make sure we initialize every md's variables in _new_from_i...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 13 Jul 2007 20:32:45 +0000 (20:32 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 13 Jul 2007 20:32:45 +0000 (20:32 +0000)
src/control/media_instance.c

index e7e6608c99f688da7599ca93865ab21e18c67f71..609ec8387e455483831fc2ee99821c07d3afbe88 100644 (file)
@@ -188,6 +188,11 @@ libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
 
     p_mi->p_libvlc_instance = p_libvlc_instance;
     p_mi->i_input_id = p_input->i_object_id;
+    /* same strategy as before */
+    p_mi->i_refcount = 1;
+    /* same strategy as before */
+    vlc_mutex_init( p_mi->p_libvlc_instance->p_libvlc_int,
+                    &p_mi->object_lock );
 
     /* will be released in media_instance_release() */
     vlc_object_yield( p_input );