mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
wayland: Error check before using cached wl_display
A planar(or some other) buffer allocation may fail on the driver, then the wayland connection becomes invalid, not able to send request or receive any event. So we need to set up a new wayland connection if there's an error detected on the cached wl_display. https://bugzilla.gnome.org/show_bug.cgi?id=768761 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
This commit is contained in:
parent
f8eb0c84d9
commit
0d1d097273
1 changed files with 6 additions and 0 deletions
|
@ -207,6 +207,7 @@ gst_vaapi_display_wayland_open_display (GstVaapiDisplay * display,
|
||||||
GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE (display);
|
GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE (display);
|
||||||
GstVaapiDisplayCache *const cache = GST_VAAPI_DISPLAY_CACHE (display);
|
GstVaapiDisplayCache *const cache = GST_VAAPI_DISPLAY_CACHE (display);
|
||||||
const GstVaapiDisplayInfo *info;
|
const GstVaapiDisplayInfo *info;
|
||||||
|
int dsp_error = 0;
|
||||||
|
|
||||||
if (!set_display_name (display, name))
|
if (!set_display_name (display, name))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -214,6 +215,11 @@ gst_vaapi_display_wayland_open_display (GstVaapiDisplay * display,
|
||||||
info = gst_vaapi_display_cache_lookup_custom (cache, compare_display_name,
|
info = gst_vaapi_display_cache_lookup_custom (cache, compare_display_name,
|
||||||
priv->display_name, g_display_types);
|
priv->display_name, g_display_types);
|
||||||
if (info) {
|
if (info) {
|
||||||
|
wl_display_roundtrip (info->native_display);
|
||||||
|
if ((dsp_error = wl_display_get_error (info->native_display)))
|
||||||
|
GST_ERROR ("wayland display error detected: %d", dsp_error);
|
||||||
|
}
|
||||||
|
if (info && !dsp_error) {
|
||||||
priv->wl_display = info->native_display;
|
priv->wl_display = info->native_display;
|
||||||
priv->use_foreign_display = TRUE;
|
priv->use_foreign_display = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue