Commit 7da70e2b authored by Matthew Waters's avatar Matthew Waters 🐨

glquery: fix a possible unintialized value

A GL driver may not fill the resulting value so initialize it to 0
ourselves.
parent c7c2d09a
......@@ -114,7 +114,7 @@ static gchar *
_log_time (gpointer user_data)
{
GstGLQuery *query = user_data;
gint64 result;
guint64 result = 0;
result = gst_gl_query_result (query);
......@@ -338,10 +338,11 @@ gst_gl_query_result (GstGLQuery * query)
gl = query->context->gl_vtable;
if (gl->GetQueryObjectui64v) {
gl->GetQueryObjectui64v (query->query_id, GL_QUERY_RESULT,
(GLuint64 *) & ret);
GLuint64 tmp = 0;
gl->GetQueryObjectui64v (query->query_id, GL_QUERY_RESULT, &tmp);
ret = tmp;
} else {
guint tmp;
guint tmp = 0;
gl->GetQueryObjectuiv (query->query_id, GL_QUERY_RESULT, &tmp);
ret = tmp;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment