]> git.sesse.net Git - vlc/commitdiff
control/media_instance.c: Work around a missing playlist feature: Playlist should...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jul 2007 20:54:33 +0000 (20:54 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jul 2007 20:54:33 +0000 (20:54 +0000)
src/control/media_instance.c

index 609ec8387e455483831fc2ee99821c07d3afbe88..968c1395e56eca90e421258a965a65d19b4e34dc 100644 (file)
@@ -60,6 +60,13 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
     /* No one is tracking this input_thread appart us. Destroy it */
     if( should_destroy )
         input_DestroyThread( p_input_thread );
+    else
+    {
+        /* XXX: hack the playlist doesn't retain the input thread,
+         * so we did it for the playlist (see _new_from_input_thread),
+         * revert that here. */
+        vlc_object_release( p_input_thread );
+    }
 }
 
 /*
@@ -197,6 +204,10 @@ libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
     /* will be released in media_instance_release() */
     vlc_object_yield( p_input );
 
+    /* XXX: Hack as the playlist doesn't yield the input thread we retain
+     * the input for the playlist. (see corresponding hack in _release) */
+    vlc_object_yield( p_input );
+
     return p_mi;
 }