diff options
author | Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk> | 2015-04-21 09:43:58 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-04-26 21:23:16 +0200 |
commit | 51daa8b9e2b351055ce59ed89b0417ff9f7dccb9 (patch) | |
tree | a5b3ef0a5c7ce9d4eb2dc248a8509b6d7da71930 /ext | |
parent | a8d498919ed0375445badd9912df5018da6d7c78 (diff) | |
download | gstreamer-plugins-bad-51daa8b9e2b351055ce59ed89b0417ff9f7dccb9.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gl/gstgltransformation.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/gl/gstgltransformation.c b/ext/gl/gstgltransformation.c index 4175c39e3..f112d9e13 100644 --- a/ext/gl/gstgltransformation.c +++ b/ext/gl/gstgltransformation.c @@ -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, |