From 14d2fe74f4e51c5b37eab4b7475c804a0340b530 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 7 Apr 2017 10:24:54 -0400 Subject: [PATCH] xephyr: Check for host XVideo support before trying to use it 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 Reviewed-by: Eric Anholt --- 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 9c9c78d11..671a0ddce 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(); }