mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
smart-video-mixer: unref pads_info hash table in dispose
Before gst_bin_dispose() runs and destroys elements.
This commit is contained in:
parent
9b82267aef
commit
5c79b5539b
1 changed files with 14 additions and 1 deletions
|
@ -171,13 +171,25 @@ _release_pad (GstElement * element, GstPad * pad)
|
|||
/****************************************************
|
||||
* GObject vmethods *
|
||||
****************************************************/
|
||||
static void
|
||||
ges_smart_mixer_dispose (GObject * object)
|
||||
{
|
||||
GESSmartMixer *self = GES_SMART_MIXER (object);
|
||||
|
||||
if (self->pads_infos != NULL) {
|
||||
g_hash_table_unref (self->pads_infos);
|
||||
self->pads_infos = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (ges_smart_mixer_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_smart_mixer_finalize (GObject * object)
|
||||
{
|
||||
GESSmartMixer *self = GES_SMART_MIXER (object);
|
||||
|
||||
g_mutex_clear (&self->lock);
|
||||
g_hash_table_unref (self->pads_infos);
|
||||
|
||||
G_OBJECT_CLASS (ges_smart_mixer_parent_class)->finalize (object);
|
||||
}
|
||||
|
@ -203,6 +215,7 @@ ges_smart_mixer_class_init (GESSmartMixerClass * klass)
|
|||
element_class->request_new_pad = GST_DEBUG_FUNCPTR (_request_new_pad);
|
||||
element_class->release_pad = GST_DEBUG_FUNCPTR (_release_pad);
|
||||
|
||||
object_class->dispose = ges_smart_mixer_dispose;
|
||||
object_class->finalize = ges_smart_mixer_finalize;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue