From 4af46f00c2a809773388b8e5e17ef9985ad034e9 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Tue, 24 Apr 2018 18:12:44 +0900 Subject: [PATCH] libs: egl: utils: mark context as wrapped when it is The returning egl context may be null, so we should check the return value. https://bugzilla.gnome.org/show_bug.cgi?id=795391 --- gst-libs/gst/vaapi/gstvaapiutils_egl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapiutils_egl.c b/gst-libs/gst/vaapi/gstvaapiutils_egl.c index 958d1fde0b..0bd02505ec 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils_egl.c +++ b/gst-libs/gst/vaapi/gstvaapiutils_egl.c @@ -1117,11 +1117,15 @@ egl_context_new_wrapped (EglDisplay * display, EGLContext gl_context) args.display = display; args.config = config; args.gl_parent_context = gl_context; + args.context = NULL; success = egl_display_run (display, (EglContextRunFunc) do_egl_context_new, &args); egl_object_unref (config); if (!success) return NULL; + + if (args.context) + args.context->base.is_wrapped = TRUE; return args.context; }