diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-26 10:19:32 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-30 13:26:22 +0100 |
commit | 1e39b59ce8c45669eb240c36e421771e8d5f7e82 (patch) | |
tree | f12121d362c41684d5d3812c1729992536909d9c | |
parent | da835c750838a50ed0708907aff84f0d0661943f (diff) | |
download | gst-vaapi-1e39b59ce8c45669eb240c36e421771e8d5f7e82.tar.gz |
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
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapitexture_glx.c | 4 |
1 files 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); |