From f42ead5a00bc3e3754fff4b8857c931951f58e7a Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 20 Apr 2018 11:14:15 +0200 Subject: [PATCH] surface: select cannot return 0 if there's no timeout Signed-off-by: Maxime Ripard --- src/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surface.c b/src/surface.c index f0239cd..4333349 100644 --- a/src/surface.c +++ b/src/surface.c @@ -187,7 +187,7 @@ VAStatus sunxi_cedrus_SyncSurface(VADriverContextP ctx, rc = select(request_fd + 1, &read_fds, NULL, NULL, NULL); // FIXME: Properly dispose of the buffers here? - if(rc < 0) + if(rc <= 0) return VA_STATUS_ERROR_UNKNOWN; assert(ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL)==0);