glmosaic: fix shader leak

gst_gl_mosaic_init_shader() is called twice with test_glmosaic so the
first shader was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=766661
This commit is contained in:
Guillaume Desmottes 2016-05-19 16:55:31 +03:00 committed by Matthew Waters
parent 0934af6cce
commit 396932f412

View file

@ -187,6 +187,7 @@ gst_gl_mosaic_init_shader (GstGLMixer * mixer, GstCaps * outcaps)
{ {
GstGLMosaic *mosaic = GST_GL_MOSAIC (mixer); GstGLMosaic *mosaic = GST_GL_MOSAIC (mixer);
g_clear_object (&mosaic->shader);
//blocking call, wait the opengl thread has compiled the shader //blocking call, wait the opengl thread has compiled the shader
return gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context, return gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context,
mosaic_v_src, mosaic_f_src, &mosaic->shader); mosaic_v_src, mosaic_f_src, &mosaic->shader);