[vlc-devel] [PATCH] glwin32: configure the vlc_gt with the actual vout_window that is used
Rémi Denis-Courmont
remi at remlab.net
Mon Feb 25 15:31:07 CET 2019
Nit in title.
But more importantly, I don't understand how it works if the display is (supposed to be) embedded? If it creates its own window unilaterally, then won't it always be non-embedded?
Le 25 février 2019 13:01:12 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>This way the matching vout_window_operations are used.
>
>Fixes a crash when using OpenGL on windows.
>
>---
>Replaces https://patches.videolan.org/patch/22634/
>---
> 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;
> }
>
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190225/d1dc100d/attachment.html>
More information about the vlc-devel
mailing list