mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
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
This commit is contained in:
parent
a8d498919e
commit
51daa8b9e2
1 changed files with 6 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue