[vlc-devel] [PATCH 2/2] vout/macosx: Ensure context exists when calling vout_display_opengl_New
Marvin Scholz
epirat07 at gmail.com
Wed Dec 28 17:45:25 CET 2016
vout_display_opengl_New seems to require a valid context, therefore we
need to vlc_gl_MakeCurrent before calling it and release it again
afterwards.
---
modules/video_output/macosx.m | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 0329741..e3fc9ac 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -267,8 +267,10 @@ static int Open (vlc_object_t *this)
const vlc_fourcc_t *subpicture_chromas;
+ vlc_gl_MakeCurrent(sys->gl);
sys->vgl = vout_display_opengl_New (&vd->fmt, &subpicture_chromas, sys->gl,
&vd->cfg->viewpoint);
+ vlc_gl_ReleaseCurrent(sys->gl);
if (!sys->vgl) {
msg_Err(vd, "Error while initializing opengl display.");
goto error;
--
2.10.1 (Apple Git-78)
More information about the vlc-devel
mailing list