[vlc-devel] [PATCH 1/2] WGL: fix the module closing

Adrien Maglo magsoft at videolan.org
Thu Jun 9 12:11:59 CEST 2016


---
 modules/video_output/win32/wgl.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c
index 895e602..4edabb3 100644
--- a/modules/video_output/win32/wgl.c
+++ b/modules/video_output/win32/wgl.c
@@ -222,16 +222,13 @@ static void Close(vlc_object_t *object)
     vlc_gl_t *gl = (vlc_gl_t *)object;
     vout_display_sys_t *sys = gl->sys;
 
-#ifdef WGL_EXT_swap_control
-    wglMakeCurrent(sys->hGLDC, sys->hGLRC);
-    DestroyGPUAffinityDC(gl);
-#endif
-
     if (sys->hGLRC)
         wglDeleteContext(sys->hGLRC);
     if (sys->hGLDC)
         ReleaseDC(sys->hvideownd, sys->hGLDC);
 
+    DestroyGPUAffinityDC(gl);
+
     free(sys);
 }
 
-- 
2.7.4



More information about the vlc-devel mailing list