[vlc-devel] commit: Remove recursive/deadlocking calls in Qt4 embedded video ( refs #2136). ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Oct 20 21:22:54 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Oct 20 21:49:19 2008 +0300| [5253760be29bc5ba22a6c3c4318ae4ec12627611] | committer: Rémi Denis-Courmont 

Remove recursive/deadlocking calls in Qt4 embedded video (refs #2136).

The vout code invokes the Qt4 video widget through the Qt4 window
submodule. Hence, the video widget cannot call the vout window code.
This is where the embedded video crashes seem to come from.
Unfortunately, this commit trades the deadlock (on 1.0) or the crash
(on 0.9) for an assertion failure.

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

 modules/gui/qt4/components/interface_widgets.cpp |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 0136648..cddd823 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -106,13 +106,10 @@ void VideoWidget::paintEvent(QPaintEvent *ev)
 #endif
 }
 
-/* Kill the vout at Destruction */
 VideoWidget::~VideoWidget()
 {
-    if( !p_vout )
-        return;
-    if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
-        vout_Control( p_vout, VOUT_REPARENT );
+    /* Ensure we are not leaking the video output. This would crash. */
+    assert( !p_vout );
 }
 
 /**




More information about the vlc-devel mailing list