diff --git a/subprojects/gst-plugins-base/ext/gl/gstglmosaic.c b/subprojects/gst-plugins-base/ext/gl/gstglmosaic.c index 53b2477866..bae95d0641 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglmosaic.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglmosaic.c @@ -73,7 +73,7 @@ static GstPad *gst_gl_mosaic_request_new_pad (GstElement * element, GstPadTemplate * temp, const gchar * req_name, const GstCaps * caps); static void gst_gl_mosaic_release_pad (GstElement * element, GstPad * pad); -static void gst_gl_mosaic_reset (GstGLMixer * mixer); +static void gst_gl_mosaic_gl_stop (GstGLBaseMixer * base_mix); static gboolean gst_gl_mosaic_set_caps (GstGLMixer * mixer, GstCaps * outcaps); static gboolean gst_gl_mosaic_process_textures (GstGLMixer * mixer, @@ -137,7 +137,7 @@ gst_gl_mosaic_class_init (GstGLMosaicClass * klass) "Julien Isorce "); GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_mosaic_set_caps; - GST_GL_MIXER_CLASS (klass)->reset = gst_gl_mosaic_reset; + GST_GL_BASE_MIXER_CLASS (klass)->gl_stop = gst_gl_mosaic_gl_stop; GST_GL_MIXER_CLASS (klass)->process_textures = gst_gl_mosaic_process_textures; } @@ -189,19 +189,19 @@ gst_gl_mosaic_release_pad (GstElement * element, GstPad * pad) } static void -gst_gl_mosaic_reset (GstGLMixer * mixer) +gst_gl_mosaic_gl_stop (GstGLBaseMixer * mixer) { GstGLMosaic *mosaic = GST_GL_MOSAIC (mixer); - if (mosaic->shader) - gst_object_unref (mosaic->shader); - mosaic->shader = NULL; + gst_clear_object (&mosaic->shader); mosaic->attr_position_loc = -1; mosaic->attr_texture_loc = -1; mosaic->xrot = 0.0; mosaic->yrot = 0.0; mosaic->zrot = 0.0; + + GST_GL_BASE_MIXER_CLASS (gst_gl_mosaic_parent_class)->gl_stop (mixer); } static gboolean diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.c index da40a24700..810629f45e 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.c @@ -568,10 +568,6 @@ static void gst_gl_mixer_gl_stop (GstGLBaseMixer * base_mix) { GstGLMixer *mix = GST_GL_MIXER (base_mix); - GstGLMixerClass *mixer_class = GST_GL_MIXER_GET_CLASS (mix); - - if (mixer_class->reset) - mixer_class->reset (mix); g_mutex_lock (&mix->priv->gl_resource_lock); gst_clear_object (&mix->priv->fbo); diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.h index 9373a23a8b..130010f75f 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmixer.h @@ -78,7 +78,6 @@ GType gst_gl_mixer_pad_get_type (void); typedef gboolean (*GstGLMixerSetCaps) (GstGLMixer* mixer, GstCaps* outcaps); -typedef void (*GstGLMixerReset) (GstGLMixer *mixer); typedef gboolean (*GstGLMixerProcessFunc) (GstGLMixer *mix, GstBuffer *outbuf); typedef gboolean (*GstGLMixerProcessTextures) (GstGLMixer *mix, GstGLMemory *out_tex); @@ -96,7 +95,6 @@ struct _GstGLMixerClass GstGLBaseMixerClass parent_class; GstGLMixerSetCaps set_caps; - GstGLMixerReset reset; GstGLMixerProcessFunc process_buffers; GstGLMixerProcessTextures process_textures; };