vlc | branch: master | Felix Paul Kühne <[email protected]> | Thu Dec  6 
10:26:30 2012 +1100| [c6a264bf022d834e7617948e4923012fc1d8369d] | committer: 
Felix Paul Kühne

macosx: fixed race condition crash when closing the vout

vout_display_opengl_Delete will call OpenglLock, so it is a bad idea to 
previously release sys->glView

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

 modules/video_output/macosx.m |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 660a62b..df71ba9 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -265,11 +265,11 @@ void Close (vlc_object_t *this)
     [(id)sys->container performSelectorOnMainThread:@selector(release) 
withObject:nil waitUntilDone:NO];
     [sys->glView performSelectorOnMainThread:@selector(removeFromSuperview) 
withObject:nil waitUntilDone:NO];
 
-    [sys->glView release];
-
     if (sys->gl.sys != NULL)
         vout_display_opengl_Delete (sys->vgl);
 
+    [sys->glView release];
+
     if (sys->embed)
         vout_display_DeleteWindow (vd, sys->embed);
     free (sys);

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to