From: Marvin Scholz Date: Wed, 28 Dec 2016 16:45:25 +0000 (+0100) Subject: vout/macosx: Ensure context exists when calling vout_display_opengl_New X-Git-Tag: 3.0.0-git~5237 X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=0486aecc1913cc77358cbe37be862813a060516e;ds=sidebyside vout/macosx: Ensure context exists when calling vout_display_opengl_New 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. Signed-off-by: Thomas Guillem --- diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m index 03297414de..e3fc9ac7ac 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;