Commit 21275caa authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

glmixer: Only finalize the other context in finalize()

Otherwise we change a value of a property when going to READY state,
which is unexpected behaviour.
parent a92ffca7
...@@ -463,7 +463,13 @@ gst_gl_mixer_init (GstGLMixer * mix) ...@@ -463,7 +463,13 @@ gst_gl_mixer_init (GstGLMixer * mix)
static void static void
gst_gl_mixer_finalize (GObject * object) gst_gl_mixer_finalize (GObject * object)
{ {
GstGLMixerPrivate *priv = GST_GL_MIXER (object)->priv; GstGLMixer *mix = GST_GL_MIXER (object);
GstGLMixerPrivate *priv = mix->priv;
if (mix->other_context) {
gst_object_unref (mix->other_context);
mix->other_context = NULL;
}
g_mutex_clear (&priv->gl_resource_lock); g_mutex_clear (&priv->gl_resource_lock);
g_cond_clear (&priv->gl_resource_cond); g_cond_clear (&priv->gl_resource_cond);
...@@ -1142,11 +1148,6 @@ gst_gl_mixer_stop (GstAggregator * agg) ...@@ -1142,11 +1148,6 @@ gst_gl_mixer_stop (GstAggregator * agg)
mix->context = NULL; mix->context = NULL;
} }
if (mix->other_context) {
gst_object_unref (mix->other_context);
mix->other_context = NULL;
}
gst_gl_mixer_reset (mix); gst_gl_mixer_reset (mix);
return TRUE; return TRUE;
......
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