mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
glcontext: correct precondition for get_gl_version
The intention was to assert if both maj and min were NULL (as there would be no point calling the function). Instead if either maj or min were NULL, the assert would occur. Fix that.
This commit is contained in:
parent
f457e29192
commit
db51c90d5d
1 changed files with 3 additions and 3 deletions
|
@ -537,9 +537,9 @@ GstGLAPI
|
||||||
gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major,
|
gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major,
|
||||||
guint * minor)
|
guint * minor)
|
||||||
{
|
{
|
||||||
const GLubyte *(GSTGLAPI *GetString) (GLenum name);
|
const GLubyte *(GSTGLAPI * GetString) (GLenum name);
|
||||||
#if GST_GL_HAVE_OPENGL
|
#if GST_GL_HAVE_OPENGL
|
||||||
void (GSTGLAPI *GetIntegerv) (GLenum name, GLuint * n);
|
void (GSTGLAPI * GetIntegerv) (GLenum name, GLuint * n);
|
||||||
#endif
|
#endif
|
||||||
const gchar *version;
|
const gchar *version;
|
||||||
gint maj, min, n;
|
gint maj, min, n;
|
||||||
|
@ -1513,7 +1513,7 @@ void
|
||||||
gst_gl_context_get_gl_version (GstGLContext * context, gint * maj, gint * min)
|
gst_gl_context_get_gl_version (GstGLContext * context, gint * maj, gint * min)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GST_IS_GL_CONTEXT (context));
|
g_return_if_fail (GST_IS_GL_CONTEXT (context));
|
||||||
g_return_if_fail (maj != NULL && min != NULL);
|
g_return_if_fail (!(maj == NULL && min == NULL));
|
||||||
|
|
||||||
if (maj)
|
if (maj)
|
||||||
*maj = context->priv->gl_major;
|
*maj = context->priv->gl_major;
|
||||||
|
|
Loading…
Reference in a new issue