[vlc-devel] commit: Untriplicate vout release code - fix #1593 ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jun 7 09:29:33 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jun  7 10:31:17 2008 +0300| [d9810ce021930691108ea74812d4ce6f5e3df547]

Untriplicate vout release code - fix #1593

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).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9810ce021930691108ea74812d4ce6f5e3df547
---

 src/playlist/engine.c           |   23 -----------------------
 src/video_output/video_output.c |    2 +-
 2 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 67b4d00..bcda392 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -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,
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 786569a..0f4a1b8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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 );




More information about the vlc-devel mailing list