[vlc-commits] vout: ios: call ReleaseCurrent only if needed when closing

Thomas Guillem git at videolan.org
Wed Mar 7 15:34:19 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar  7 08:56:57 2018 +0100| [6023de8286f49cf285b594dff50823a691e95a2f] | committer: Thomas Guillem

vout: ios: call ReleaseCurrent only if needed when closing

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

 modules/video_output/ios.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 28f259ed8b..d024305f20 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -239,9 +239,10 @@ static void Close (vlc_object_t *this)
 
             if (likely(glsys->vgl))
             {
-                vlc_gl_MakeCurrent(sys->gl);
+                int ret = vlc_gl_MakeCurrent(sys->gl);
                 vout_display_opengl_Delete(glsys->vgl);
-                vlc_gl_ReleaseCurrent(sys->gl);
+                if (ret == VLC_SUCCESS)
+                    vlc_gl_ReleaseCurrent(sys->gl);
             }
             vlc_object_release(sys->gl);
         }



More information about the vlc-commits mailing list