diff options
Diffstat (limited to 'gst/vaapi/gstvaapipluginbase.c')
-rw-r--r-- | gst/vaapi/gstvaapipluginbase.c | 13 |
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 } |