mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
glquery: fix a possible unintialized value
A GL driver may not fill the resulting value so initialize it to 0 ourselves.
This commit is contained in:
parent
c7c2d09acf
commit
7da70e2b9f
1 changed files with 5 additions and 4 deletions
|
@ -114,7 +114,7 @@ static gchar *
|
||||||
_log_time (gpointer user_data)
|
_log_time (gpointer user_data)
|
||||||
{
|
{
|
||||||
GstGLQuery *query = user_data;
|
GstGLQuery *query = user_data;
|
||||||
gint64 result;
|
guint64 result = 0;
|
||||||
|
|
||||||
result = gst_gl_query_result (query);
|
result = gst_gl_query_result (query);
|
||||||
|
|
||||||
|
@ -338,10 +338,11 @@ gst_gl_query_result (GstGLQuery * query)
|
||||||
|
|
||||||
gl = query->context->gl_vtable;
|
gl = query->context->gl_vtable;
|
||||||
if (gl->GetQueryObjectui64v) {
|
if (gl->GetQueryObjectui64v) {
|
||||||
gl->GetQueryObjectui64v (query->query_id, GL_QUERY_RESULT,
|
GLuint64 tmp = 0;
|
||||||
(GLuint64 *) & ret);
|
gl->GetQueryObjectui64v (query->query_id, GL_QUERY_RESULT, &tmp);
|
||||||
|
ret = tmp;
|
||||||
} else {
|
} else {
|
||||||
guint tmp;
|
guint tmp = 0;
|
||||||
gl->GetQueryObjectuiv (query->query_id, GL_QUERY_RESULT, &tmp);
|
gl->GetQueryObjectuiv (query->query_id, GL_QUERY_RESULT, &tmp);
|
||||||
ret = tmp;
|
ret = tmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue