[vlc-devel] [PATCH] egl: initialize context for error handling

Thomas Guillem thomas at gllm.fr
Mon Dec 9 17:17:25 CET 2019


LGTM

On Mon, Dec 9, 2019, at 17:12, Alexandre Janniaux wrote:
> Otherwise, we end up calling eglDestroyContext with a bad value in the
> case the surface cannot be create. Not being able to create the surface
> isn't even rare as it can happen if the format we required is not supported.
> 
> Harmless regression from f5a766e3699f19f3a37f6331e62bdc5de0e7fd04
> ---
>  modules/video_output/opengl/egl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/modules/video_output/opengl/egl.c 
> b/modules/video_output/opengl/egl.c
> index 53d770365a..c1c19462c9 100644
> --- a/modules/video_output/opengl/egl.c
> +++ b/modules/video_output/opengl/egl.c
> @@ -216,6 +216,7 @@ static int Open(vlc_gl_t *gl, const struct gl_api 
> *api,
>      gl->sys = sys;
>      sys->display = EGL_NO_DISPLAY;
>      sys->surface = EGL_NO_SURFACE;
> +    sys->context = EGL_NO_CONTEXT;
>      sys->eglCreateImageKHR = NULL;
>      sys->eglDestroyImageKHR = NULL;
>  
> -- 
> 2.24.0
> 
> _______________________________________________
> 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