[vlc-commits] macosx: remove callback in VLCVoutView correctly. Fixes #5428

Felix Paul Kühne git at videolan.org
Sat Oct 15 16:57:19 CEST 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Oct 15 16:56:25 2011 +0200| [767cf1191d4063495a9ac89f7dbd8fbcf8fccda7] | committer: Felix Paul Kühne

macosx: remove callback in VLCVoutView correctly. Fixes #5428

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

 modules/gui/macosx/VideoView.m |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index ea702a2..86e9b05 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -153,6 +153,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 
 - (void)closeVout
 {
+    vout_thread_t * p_vout = getVout();
+    if( !p_vout )
+    {
+        var_DelCallback( p_vout, "video-device", DeviceCallback, NULL );
+        vlc_object_release( p_vout );
+    }
+
     /* Make sure we don't see a white flash */
     [o_view removeFromSuperview];
     [o_view release];



More information about the vlc-commits mailing list