surface: select cannot return 0 if there's no timeout

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
Maxime Ripard
2018-04-20 11:14:15 +02:00
parent 4328b65621
commit f42ead5a00
+1 -1
View File
@@ -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);