[vlc-commits] glwin32: configure the vlc_gt with the actual vout_window that is used
Steve Lhomme
git at videolan.org
Mon Feb 25 14:52:21 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 25 10:38:48 2019 +0100| [13ef596c7beed7e44c561b368258231596d89680] | committer: Steve Lhomme
glwin32: configure the vlc_gt with the actual vout_window that is used
This way the matching vout_window_operations are used.
Fixes a crash when using OpenGL on windows.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13ef596c7beed7e44c561b368258231596d89680
---
modules/video_output/win32/glwin32.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index e654455633..0c39fa721e 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -127,16 +127,17 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
if (!sys->sys.b_windowless)
EventThreadUpdateTitle(sys->sys.event, VOUT_TITLE " (OpenGL output)");
- vout_window_t *surface = EmbedVideoWindow_Create(vd);
- if (!surface)
+ vout_display_cfg_t embed_cfg = *cfg;
+ embed_cfg.window = EmbedVideoWindow_Create(vd);
+ if (!embed_cfg.window)
goto error;
- char *modlist = var_InheritString(surface, "gl");
- sys->gl = vlc_gl_Create(cfg, VLC_OPENGL, modlist);
+ char *modlist = var_InheritString(embed_cfg.window, "gl");
+ sys->gl = vlc_gl_Create(&embed_cfg, VLC_OPENGL, modlist);
free(modlist);
if (!sys->gl)
{
- vlc_object_release(surface);
+ vlc_object_release(embed_cfg.window);
goto error;
}
More information about the vlc-commits
mailing list