libs: window: wayland: cancel read at poll message

Always call wl_display_cancel_read() when an errno is set, but
different to EAGAIN or EINTR.

https://bugzilla.gnome.org/show_bug.cgi?id=780442
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-04-20 20:30:52 +02:00
parent 26486c436a
commit 9c3a4edf05

View file

@ -188,11 +188,11 @@ gst_vaapi_window_wayland_sync (GstVaapiWindow * window)
int saved_errno = errno;
if (saved_errno == EAGAIN || saved_errno == EINTR)
goto again;
if (saved_errno == EBUSY) { /* closing */
wl_display_cancel_read (wl_display);
wl_display_cancel_read (wl_display);
if (saved_errno == EBUSY) /* flushing */
return FALSE;
}
goto error;
else
goto error;
}
if (wl_display_read_events (wl_display) < 0)