summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2018-04-24 18:12:44 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-04-26 08:34:57 +0200
commit1660bd0df1817f2232328c41bb2f5fc54ff41f6b (patch)
treeb8d7a313f9fd370488434913383543ee491c87d1
parent1dc3c9e183669c2b23ab0428109a6e107ace6e25 (diff)
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
-rw-r--r--gst-libs/gst/vaapi/gstvaapiutils_egl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiutils_egl.c b/gst-libs/gst/vaapi/gstvaapiutils_egl.c
index 0f039099..00b91242 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils_egl.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils_egl.c
@@ -1083,11 +1083,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;
}