texture: check for expected target and format

gst_vaapi_texture_glx_new_wrapped() only handles a GL_TEXTURE_2D target and
formats GL_RGBA or GL_BGRA.

This patch adds a debugging verification of those values.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=753099
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-11-26 10:19:32 +01:00
parent da835c7508
commit 1e39b59ce8

View file

@ -264,8 +264,8 @@ gst_vaapi_texture_glx_new_wrapped (GstVaapiDisplay * display,
g_return_val_if_fail (GST_VAAPI_IS_DISPLAY_GLX (display), NULL);
g_return_val_if_fail (texture_id != GL_NONE, NULL);
g_return_val_if_fail (target != GL_NONE, NULL);
g_return_val_if_fail (format != GL_NONE, NULL);
g_return_val_if_fail (target == GL_TEXTURE_2D, NULL);
g_return_val_if_fail (format == GL_RGBA || format == GL_BGRA, NULL);
/* Check texture dimensions */
GST_VAAPI_DISPLAY_LOCK (display);