timeline-element,track,framepositionner: don't leak internal object

https://bugzilla.gnome.org/show_bug.cgi?id=755247
This commit is contained in:
Justin Kim 2015-09-22 01:06:00 +09:00 committed by Thibault Saunier
parent abf60df4af
commit 731bda1592
3 changed files with 8 additions and 2 deletions

View file

@ -247,6 +247,9 @@ ges_timeline_element_dispose (GObject * object)
{
GESTimelineElement *self = GES_TIMELINE_ELEMENT (object);
if (self->priv->children_props)
g_hash_table_unref (self->priv->children_props);
g_clear_object (&self->priv->copied_from);
}

View file

@ -292,6 +292,7 @@ _ghost_nlecomposition_srcpad (GESTrack * track)
gst_pad_link (pad, capsfilter_sink);
gst_object_unref (capsfilter_sink);
gst_object_unref (pad);
capsfilter_src = gst_element_get_static_pad (priv->capsfilter, "src");
/* ghost the pad */
@ -522,6 +523,7 @@ ges_track_constructed (GObject * object)
nleobject = gst_element_factory_make ("nleoperation", "mixing-operation");
if (!gst_bin_add (GST_BIN (nleobject), mixer)) {
GST_WARNING_OBJECT (self, "Could not add the mixer to our composition");
gst_object_unref (mixer);
gst_object_unref (nleobject);
return;
@ -531,12 +533,13 @@ ges_track_constructed (GObject * object)
if (self->priv->mixing) {
if (!ges_nle_composition_add_object (self->priv->composition, nleobject)) {
GST_WARNING_OBJECT (self, "Could not add the mixer to our composition");
gst_object_unref (nleobject);
return;
}
}
self->priv->mixing_operation = gst_object_ref (nleobject);
self->priv->mixing_operation = nleobject;
} else {
GST_INFO_OBJECT (self, "No way to create a main mixer");

View file

@ -107,7 +107,7 @@ gst_frame_positionner_update_properties (GstFramePositionner * pos,
pos->height = pos->track_height;
}
GST_DEBUG_OBJECT (pos, "setting caps : %s", gst_caps_to_string (caps));
GST_DEBUG_OBJECT (caps, "setting caps");
g_object_set (pos->capsfilter, "caps", caps, NULL);