[vlc-devel] commit: VOUT_CLOSE is unsafe and pointless. Do not use it. ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 14 19:27:10 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Feb 14 20:23:17 2009 +0200| [6021d023dd0b5c833fb2f5cecb94aae085a3b18a] | committer: Rémi Denis-Courmont 

VOUT_CLOSE is unsafe and pointless. Do not use it.

If an interface exits "early" it should reparent (although reparenting
is no safer). Otherwise, the core will ensure that the video output was
safely closed before it terminates the interface.

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

 modules/gui/maemo/maemo.c          |    3 +--
 modules/gui/skins2/src/vlcproc.cpp |    6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/gui/maemo/maemo.c b/modules/gui/maemo/maemo.c
index 0690062..82c6a1d 100644
--- a/modules/gui/maemo/maemo.c
+++ b/modules/gui/maemo/maemo.c
@@ -254,8 +254,7 @@ static void Run( intf_thread_t *p_intf )
 
     if( p_vout )
     {
-        if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
-            vout_Control( p_vout, VOUT_REPARENT, 0 );
+        vout_Control( p_vout, VOUT_REPARENT, 0 );
         vlc_object_release( p_vout );
     }
 
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index f52f8de..bc86792 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -203,8 +203,7 @@ void VlcProc::registerVoutWindow( void *pVoutWindow )
     // Reparent the vout window
     if( m_pVout )
     {
-        if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
-            vout_Control( m_pVout, VOUT_CLOSE );
+        vout_Control( m_pVout, VOUT_REPARENT, 0 );
     }
 }
 
@@ -219,8 +218,7 @@ void VlcProc::dropVout()
 {
     if( m_pVout )
     {
-        if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
-            vout_Control( m_pVout, VOUT_CLOSE );
+        vout_Control( m_pVout, VOUT_REPARENT, 0 );
         m_pVout = NULL;
     }
 }




More information about the vlc-devel mailing list