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 <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Adam Jackson 2017-04-07 10:24:54 -04:00
parent 7dfb9608d0
commit 14d2fe74f4

View File

@ -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();
}