timeline-element,track,framepositionner: don't leak internal object
authorJustin Kim <justin.kim@collabora.com>
Mon, 21 Sep 2015 16:06:00 +0000 (01:06 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 30 Sep 2015 09:50:28 +0000 (11:50 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=755247

ges/ges-timeline-element.c
ges/ges-track.c
ges/gstframepositionner.c

index eb7d88c63a671a84f4062037206a4681537e0253..94e8968951c236aba5f517633329e846b067ae58 100644 (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);
 }
 
index 73f9957502a126793933b2cfdd80bce40e68838a..bbb35087a64b2a7023201aef2ac74ce3c8b880ab 100644 (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");
index 9d2ece4207c8d7bdb14e45a1f20c58cc43e392aa..d98c712c9e2083155d2d72ab74f937043bd155dd 100644 (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);