[vlc-devel] commit: Do not save a vout if there is still an active vout. ( Laurent Aimar )

git version control git at videolan.org
Thu Feb 5 22:26:39 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Feb  5 22:24:56 2009 +0100| [de6ce14e7b6974f29b3dbafe21e594b549c96385] | committer: Laurent Aimar 

Do not save a vout if there is still an active vout.

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

 src/input/ressource.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/input/ressource.c b/src/input/ressource.c
index 8320e90..0fd1e3b 100644
--- a/src/input/ressource.c
+++ b/src/input/ressource.c
@@ -229,11 +229,12 @@ static vout_thread_t *RequestVout( input_ressource_t *p_ressource,
 
         vlc_mutex_lock( &p_ressource->lock_vout );
         TAB_REMOVE( p_ressource->i_vout, p_ressource->pp_vout, p_vout );
+        const int i_vout_active = p_ressource->i_vout;
         vlc_mutex_unlock( &p_ressource->lock_vout );
 
-        if( p_ressource->p_vout_free )
+        if( p_ressource->p_vout_free || i_vout_active > 0 )
         {
-            msg_Dbg( p_ressource->p_input, "detroying vout (already one saved)" );
+            msg_Dbg( p_ressource->p_input, "detroying vout (already one saved or active)" );
             vout_CloseAndRelease( p_vout );
         }
         else




More information about the vlc-devel mailing list