Commit 51daa8b9 authored by Lubosz Sarnecki's avatar Lubosz Sarnecki Committed by Sebastian Dröge

gltransformation: don't initialize multiple shaders on renegotiation

https://bugzilla.gnome.org/show_bug.cgi?id=748407

* delete shader if one exists
* set it to NULL after unrefing
parent a8d49891
......@@ -406,6 +406,7 @@ gst_gl_transformation_reset_gl (GstGLFilter * filter)
}
gst_object_unref (transformation->shader);
transformation->shader = NULL;
}
static void
......@@ -425,6 +426,11 @@ gst_gl_transformation_init_shader (GstGLFilter * filter)
{
GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
if (transformation->shader) {
gst_object_unref (transformation->shader);
transformation->shader = NULL;
}
if (gst_gl_context_get_gl_api (GST_GL_BASE_FILTER (filter)->context)) {
/* blocking call, wait until the opengl thread has compiled the shader */
return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context,
......
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