[vlc-devel] commit: Remove video output when input stops - fixes #1637 ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri Jun 27 17:30:20 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Jun 27 18:31:27 2008 +0300| [c71ebdc51d377eb489b8e53d749d722d6fd4e563]

Remove video output when input stops - fixes #1637

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

 src/playlist/engine.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index e6cfc3a..7dee54c 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -1,8 +1,7 @@
 /*****************************************************************************
  * engine.c : Run the playlist and handle its control
  *****************************************************************************
- * Copyright (C) 1999-2007 the VideoLAN team
- * $Id$
+ * Copyright (C) 1999-2008 the VideoLAN team
  *
  * Authors: Samuel Hocevar <sam at zoy.org>
  *          Clément Stenac <zorglub at videolan.org>
@@ -196,6 +195,16 @@ 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 ) ) )
+    {
+        vlc_object_release( p_obj );
+        if( p_obj->p_parent == VLC_OBJECT(p_playlist->p_libvlc) )
+        {
+            msg_Dbg( p_playlist, "garbage collector destroying 1 vout" );
+            vlc_object_release( p_obj ); /* Hmm, is this (thread-)safe?? */
+        }
+    }
     p_playlist->b_cant_sleep = false;
     vlc_mutex_unlock( &p_playlist->gc_lock );
 }




More information about the vlc-devel mailing list