GstVaapiDisplayEGL is a wrapper of another GstVaapiDisplay, either X11
or Wayland. Nonetheless it created another vaDisplay for it, instead
of using the wrapped one.
This patch enables the reuse of the wrapped vaDisplay avoiding
instantiating two.
https://bugzilla.gnome.org/show_bug.cgi?id=782212
GstVaapiDisplayClass *const klass =
GST_VAAPI_DISPLAY_GET_CLASS (display->display);
+ info->va_display = GST_VAAPI_DISPLAY_VADISPLAY (display->display);
+
if (klass->get_display && !klass->get_display (display->display, info))
return FALSE;
return TRUE;
if (dpy->texture_map)
gst_object_unref (dpy->texture_map);
+
+ /* HACK to avoid to call twice vaTerminate() since this and the
+ * proxied display share the same vaDisplay */
+ GST_VAAPI_DISPLAY_VADISPLAY (object) = NULL;
+
G_OBJECT_CLASS (gst_vaapi_display_egl_parent_class)->finalize (object);
}