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

2018-03-07 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Wed Mar  7 
08:56:57 2018 +0100| [631a67502bedfda03dc0fdd31829bc79f4e675c4] | committer: 
Thomas Guillem

vout: ios: call ReleaseCurrent only if needed when closing

(cherry picked from commit 6023de8286f49cf285b594dff50823a691e95a2f)
Signed-off-by: Thomas Guillem 

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

 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);
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


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

2018-03-07 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | 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);
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits