vlc | branch: master | Felix Paul Kühne <[email protected]> | Tue Jun  9 
10:50:51 2015 +0200| [91308f0b52e578a2b62bcdc51c9367a73bdef936] | committer: 
Felix Paul Kühne

vout iOS: prevent termination on close

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

 modules/video_output/ios2.m |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index 425d2c8..07d53a1 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -247,8 +247,12 @@ void Close (vlc_object_t *this)
     [sys->glESView performSelectorOnMainThread:@selector(removeFromSuperview) 
withObject:nil waitUntilDone:NO];
 
     if (sys->gl.sys != NULL) {
-        msg_Dbg(this, "deleting display");
-        vout_display_opengl_Delete(sys->vgl);
+        @synchronized (sys->glESView) {
+            msg_Dbg(this, "deleting display");
+
+            if (likely([sys->glESView isAppActive]))
+                vout_display_opengl_Delete(sys->vgl);
+        }
     }
 
     [sys->glESView release];

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

Reply via email to