[vlc-commits] opengl: release current context before destroying it
Rémi Denis-Courmont
git at videolan.org
Tue Jun 4 20:05:20 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 30 18:42:33 2013 +0300| [fca90e8399a149bf42979675b73ef87e3b8f17c3] | committer: Rémi Denis-Courmont
opengl: release current context before destroying it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fca90e8399a149bf42979675b73ef87e3b8f17c3
---
modules/video_output/gl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index b31b3ac..cf7c624 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -158,7 +158,10 @@ static int Open (vlc_object_t *obj)
const vlc_fourcc_t *spu_chromas;
sys->vgl = vout_display_opengl_New (&vd->fmt, &spu_chromas, sys->gl);
if (!sys->vgl)
+ {
+ vlc_gl_ReleaseCurrent (sys->gl);
goto error;
+ }
vd->sys = sys;
vd->info.has_pictures_invalid = false;
@@ -189,6 +192,8 @@ static void Close (vlc_object_t *obj)
vout_display_sys_t *sys = vd->sys;
vout_display_opengl_Delete (sys->vgl);
+ vlc_gl_ReleaseCurrent (sys->gl);
+
vlc_gl_Destroy (sys->gl);
vout_display_DeleteWindow (vd, sys->window);
free (sys);
More information about the vlc-commits
mailing list