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-26 08:27:28 +0200 |
commit | 5de030076c5486b1656edd3f5869efbafa2cd67d (patch) | |
tree | 66221f0aed2f25b52cea7a10897d7926c22a8c5d | |
parent | b50e42250e5061ecc2662543f77d89cb5386f871 (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; } |