summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-04-20 20:30:52 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-04-21 16:01:34 +0200
commit9c3a4edf05ea325934c688622c8b1a1597620d0e (patch)
tree66edfe4230b36cc7a16c1450ac665b83f019470b
parent26486c436a6d7f6bd0a2bbb26ac3ef9ab06f08ef (diff)
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
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_wayland.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
index df644aab..dda423ba 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
@@ -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)