summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2019-04-18 09:59:46 +0200
committerAnton Kindestam <antonki@kth.se>2019-09-22 22:39:10 +0200
commitb6def652a4b0db0f3514a44fec08f4be66187f3b (patch)
tree7967159dff82994d6e65d767135497d793e5905b
parentcbff8a5862aaf715bc38c9f5d1b4e2bc43baaf2c (diff)
downloadmpv-b6def652a4b0db0f3514a44fec08f4be66187f3b.tar.bz2
mpv-b6def652a4b0db0f3514a44fec08f4be66187f3b.tar.xz
context_drm_egl: Don't get stuck forever if drmHandleEvent fails
-rw-r--r--video/out/opengl/context_drm_egl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index fe296d2592..dbcd1452c0 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -501,8 +501,10 @@ static void wait_on_flip(struct ra_ctx *ctx)
poll(fds, 1, timeout_ms);
if (fds[0].revents & POLLIN) {
const int ret = drmHandleEvent(p->kms->fd, &p->ev);
- if (ret != 0)
+ if (ret != 0) {
MP_ERR(ctx->vo, "drmHandleEvent failed: %i\n", ret);
+ return;
+ }
}
}
}