mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue