From 1e39b59ce8c45669eb240c36e421771e8d5f7e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 26 Nov 2015 10:19:32 +0100 Subject: texture: check for expected target and format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 https://bugzilla.gnome.org/show_bug.cgi?id=753099 --- gst-libs/gst/vaapi/gstvaapitexture_glx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapitexture_glx.c b/gst-libs/gst/vaapi/gstvaapitexture_glx.c index abaac944..b9eb81fa 100644 --- a/gst-libs/gst/vaapi/gstvaapitexture_glx.c +++ b/gst-libs/gst/vaapi/gstvaapitexture_glx.c @@ -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); -- cgit v1.2.1