[vlc-devel] [PATCH] glwin32: configure the vlc_gt with the actual vout_window that is used

Thomas Guillem thomas at gllm.fr
Mon Feb 25 12:10:34 CET 2019


LGTM.

On Mon, Feb 25, 2019, at 12:01, Steve Lhomme wrote:
> 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


More information about the vlc-devel mailing list