[vlc-commits] gl: don't call ReleaseCurrent in case of failure

Thomas Guillem git at videolan.org
Wed Oct 25 11:53:30 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct 25 11:51:49 2017 +0200| [8c69c05f8a25b32624585c7c87725d09c21e07f2] | committer: Thomas Guillem

gl: don't call ReleaseCurrent in case of failure

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

 modules/video_output/opengl/display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index d04e4fba39..6929f322d0 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -206,8 +206,10 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
     vout_display_sys_t *sys = vd->sys;
 
     if (vlc_gl_MakeCurrent (sys->gl) == VLC_SUCCESS)
+    {
         vout_display_opengl_Prepare (sys->vgl, pic, subpicture);
-    vlc_gl_ReleaseCurrent (sys->gl);
+        vlc_gl_ReleaseCurrent (sys->gl);
+    }
 }
 
 static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)



More information about the vlc-commits mailing list