[PATCH xserver] xephyr: Check for host XVideo support before trying to use it

Adam Jackson ajax at redhat.com
Fri Apr 7 14:24:54 UTC 2017


Otherwise xcb will treat our attempt to send xv requests as a connection
error (quite reasonably: we're asking it to emit a request for which
there is no defined major opcode), and we'll die quietly the first time
we hit KdBlockhandler.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/kdrive/ephyr/ephyrvideo.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 9c9c78d..671a0dd 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -226,6 +226,11 @@ ephyrInitVideo(ScreenPtr pScreen)
         return FALSE;
     }
 
+    if (!hostx_has_extension(&xcb_xv_id)) {
+        EPHYR_LOG_ERROR("Host has no XVideo extension\n");
+        return FALSE;
+    }
+
     if (!xv_priv) {
         xv_priv = ephyrXVPrivNew();
     }
-- 
2.9.3



More information about the xorg-devel mailing list