[vlc-commits] vout/macosx: Ensure context exists when calling vout_display_opengl_New
Marvin Scholz
git at videolan.org
Thu Dec 29 13:48:46 CET 2016
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Dec 28 17:45:25 2016 +0100| [0486aecc1913cc77358cbe37be862813a060516e] | committer: Thomas Guillem
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 <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0486aecc1913cc77358cbe37be862813a060516e
---
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;
More information about the vlc-commits
mailing list