Commit 7c0a6a24 authored by Thomas Guillem's avatar Thomas Guillem

opengl: vaapi: fix UB when surface type and module doesn't match

Fixes #19204
parent 68af3d0e
......@@ -444,7 +444,7 @@ Open(vlc_object_t *obj)
if (priv->glEGLImageTargetTexture2DOES == NULL)
goto error;
int ret;
int ret = VLC_EGENERIC;
#if defined (HAVE_VA_X11)
if (tc->gl->surface->type == VOUT_WINDOW_TYPE_XID)
ret = x11_init_vaapi_instance(tc, priv);
......@@ -460,6 +460,8 @@ Open(vlc_object_t *obj)
if (ret != VLC_SUCCESS)
goto error;
assert(priv->vadpy != NULL && priv->vainst != NULL);
if (tc_va_check_interop_blacklist(tc, priv->vadpy))
goto error;
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