[vlc-devel] commit: Fix object leaking when taking a snapshot. ( Rémi Duraffort )

git version control git at videolan.org
Sat Sep 6 00:27:03 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Duraffort <ivoire at videolan.org> | Fri Sep  5 23:47:06 2008 +0200| [09f9768204b00e6ed8b5740fb4d27f6cfbe71111] | committer: Jean-Baptiste Kempf 

Fix object leaking when taking a snapshot.
(cherry picked from commit dbc2bb8aea3167922d0688aabcde6d65440aa060)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index dee3774..216d26b 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -403,7 +403,11 @@ void AdvControlsWidget::snapshot()
 {
     vout_thread_t *p_vout =
         (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
-    if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT );
+    if( p_vout )
+    {
+        vout_Control( p_vout, VOUT_SNAPSHOT );
+        vlc_object_release( p_vout );
+    }
 }
 
 /* Function called when the button is clicked() */




More information about the vlc-devel mailing list