diff options
author | Hyunjun Ko <zzoon@igalia.com> | 2018-04-24 18:12:44 +0900 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-04-25 18:00:17 +0200 |
commit | 4af46f00c2a809773388b8e5e17ef9985ad034e9 (patch) | |
tree | a1663204a113750567d34374d5b899ebcb48ef6a | |
parent | 9fde93f80c8af99adf892a96a0667b57a6f027af (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.c | 4 |
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 958d1fde..0bd02505 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; } |