From: Justin Kim Date: Mon, 21 Sep 2015 16:06:00 +0000 (+0900) Subject: timeline-element,track,framepositionner: don't leak internal object X-Git-Tag: 1.19.3~493^2~1118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=731bda15926418bedd9a7e1343efdd49ae3dc108;p=platform%2Fupstream%2Fgstreamer.git timeline-element,track,framepositionner: don't leak internal object https://bugzilla.gnome.org/show_bug.cgi?id=755247 --- diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index eb7d88c63a..94e8968951 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -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); } diff --git a/ges/ges-track.c b/ges/ges-track.c index 73f9957502..bbb35087a6 100644 --- a/ges/ges-track.c +++ b/ges/ges-track.c @@ -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"); diff --git a/ges/gstframepositionner.c b/ges/gstframepositionner.c index 9d2ece4207..d98c712c9e 100644 --- a/ges/gstframepositionner.c +++ b/ges/gstframepositionner.c @@ -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);