Commit b656e58f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB/XVideo: check version correctly

X11 extensions are upward compatible only if they have the same major
version number. In other words, we wouldn't support XVideo >= 3.0.
parent 4734d55b
......@@ -108,22 +108,25 @@ static bool CheckXVideo (vout_display_t *vd, xcb_connection_t *conn)
xcb_xv_query_extension_cookie_t ck = xcb_xv_query_extension (conn);
bool ok = false;
/* We need XVideo 2.2 for PutImage */
r = xcb_xv_query_extension_reply (conn, ck, NULL);
if (r != NULL)
{ /* We need XVideo 2.2 for PutImage */
if ((r->major > 2) || (r->major == 2 && r->minor >= 2))
{
msg_Dbg (vd, "using XVideo extension v%"PRIu8".%"PRIu8,
r->major, r->minor);
ok = true;
}
else
msg_Dbg (vd, "XVideo extension too old (v%"PRIu8".%"PRIu8,
r->major, r->minor);
free (r);
}
else
if (r == NULL)
msg_Dbg (vd, "XVideo extension not available");
else
if (r->major != 2)
msg_Dbg (vd, "XVideo extension v%"PRIu8".%"PRIu8" unknown",
r->major, r->minor);
else
if (r->minor < 2)
msg_Dbg (vd, "XVideo extension v%"PRIu8".%"PRIu8" too old",
r->major, r->minor);
else
{
msg_Dbg (vd, "using XVideo extension v%"PRIu8".%"PRIu8,
r->major, r->minor);
ok = true;
}
free (r);
return ok;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment