]> git.sesse.net Git - vlc/commitdiff
Untriplicate vout release code - fix #1593
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 7 Jun 2008 07:31:17 +0000 (10:31 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 7 Jun 2008 07:31:17 +0000 (10:31 +0300)
Unused video outputs are currently attached to libvlc, so there is no
point in destroying them from the playlist (twice), then from libvlc.
This should also fix #1593 (multiple vout free).

src/playlist/engine.c
src/video_output/video_output.c

index 67b4d00bab08e78ab4e0b4f5efa074163772f18c..bcda392443f98883883286ad82ef6289391ab054 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <assert.h>
 #include <vlc_common.h>
-#include <vlc_vout.h>
 #include <vlc_sout.h>
 #include <vlc_playlist.h>
 #include <vlc_interface.h>
@@ -196,19 +195,6 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
     }
 
     vlc_mutex_lock( &p_playlist->gc_lock );
-    while( ( p_obj = vlc_object_find( p_playlist->p_libvlc, VLC_OBJECT_VOUT,
-                                                  FIND_CHILD ) ) )
-    {
-        if( p_obj->p_parent != VLC_OBJECT(p_playlist->p_libvlc) )
-        {
-            vlc_object_release( p_obj );
-            break;
-        }
-        msg_Dbg( p_playlist, "garbage collector destroying 1 vout" );
-        vlc_object_detach( p_obj );
-        vlc_object_release( p_obj );
-        vlc_object_release( (vout_thread_t *)p_obj );
-    }
     p_playlist->b_cant_sleep = false;
     vlc_mutex_unlock( &p_playlist->gc_lock );
 }
@@ -430,15 +416,6 @@ void playlist_LastLoop( playlist_t *p_playlist )
         sout_DeleteInstance( p_sout );
 #endif
 
-    /* close all remaining vout */
-    while( ( p_obj = vlc_object_find( p_playlist,
-                                      VLC_OBJECT_VOUT, FIND_CHILD ) ) )
-    {
-        vlc_object_detach( p_obj );
-        vlc_object_release( p_obj );
-        vlc_object_release( (vout_thread_t *)p_obj );
-    }
-
     while( p_playlist->i_sds )
     {
         playlist_ServicesDiscoveryRemove( p_playlist,
index 786569adb82bad3c3577d1df1733824411d09a69..0f4a1b88e421956e3c1c6a7a6035cc7d965c8c79 100644 (file)
@@ -124,7 +124,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
 {
     if( !p_fmt )
     {
-        /* Reattach video output to playlist before bailing out */
+        /* Reattach video output to the instance before bailing out */
         if( p_vout )
         {
             spu_Attach( p_vout->p_spu, p_this, false );