summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-10-10 17:14:15 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-11-01 11:27:36 +0100
commitfc1c41551534dcb2ccd228fe006d37a358faceda (patch)
tree65ffeb2a6f295386cc928805814daf24b406259b
parent4866e4c452d28794c216a1730f923dfa9eac8616 (diff)
plugins: set GL objects if context is handled
Only set the GL display and GL other context if they are extracted correctly from the gstreamer's context. https://bugzilla.gnome.org/show_bug.cgi?id=773453
-rw-r--r--gst/vaapi/gstvaapipluginbase.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c
index 1f81ac10..8318fa37 100644
--- a/gst/vaapi/gstvaapipluginbase.c
+++ b/gst/vaapi/gstvaapipluginbase.c
@@ -80,9 +80,16 @@ gst_vaapi_plugin_base_set_context (GstVaapiPluginBase * plugin,
plugin_set_display (plugin, display);
#if USE_GST_GL_HELPERS
- gst_gl_handle_set_context (GST_ELEMENT_CAST (plugin), context,
- (GstGLDisplay **) & plugin->gl_display,
- (GstGLContext **) & plugin->gl_other_context);
+ {
+ GstGLDisplay *gl_display = NULL;
+ GstGLContext *gl_other_context = NULL;
+ GstElement *el = GST_ELEMENT_CAST (plugin);
+
+ if (gst_gl_handle_set_context (el, context, &gl_display, &gl_other_context)) {
+ plugin->gl_display = (GstObject *) gl_display;
+ plugin->gl_other_context = (GstObject *) gl_other_context;
+ }
+ }
#endif
}