gst-editing-services: ges: Remove transitions properly

Thibault Saunier tsaunier at kemper.freedesktop.org
Wed Jan 11 07:04:33 PST 2012


Module: gst-editing-services
Branch: master
Commit: 97846d698c68b171afc67533274442cc295753d0
URL:    http://cgit.freedesktop.org/gstreamer/gst-editing-services/commit/?id=97846d698c68b171afc67533274442cc295753d0

Author: Thibault Saunier <thibault.saunier at collabora.com>
Date:   Tue Dec  6 14:11:21 2011 -0300

ges: Remove transitions properly

---

 ges/ges-timeline-layer.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ges/ges-timeline-layer.c b/ges/ges-timeline-layer.c
index cb4fa1b..7a4f19e 100644
--- a/ges/ges-timeline-layer.c
+++ b/ges/ges-timeline-layer.c
@@ -36,6 +36,9 @@
 
 #define LAYER_HEIGHT 10
 
+static void
+track_object_removed_cb (GESTimelineObject * object,
+    GESTrackObject * track_object, GESTimelineLayer * layer);
 static void track_object_added_cb (GESTimelineObject * object,
     GESTrackObject * track_object, GESTimelineLayer * layer);
 static void track_object_changed_cb (GESTrackObject * track_object,
@@ -312,6 +315,8 @@ ges_timeline_layer_add_object (GESTimelineLayer * layer,
     if (GES_IS_TIMELINE_SOURCE (object)) {
       g_signal_connect (G_OBJECT (object), "track-object-added",
           G_CALLBACK (track_object_added_cb), layer);
+      g_signal_connect (G_OBJECT (object), "track-object-removed",
+          G_CALLBACK (track_object_removed_cb), layer);
     }
   }
 
@@ -372,13 +377,12 @@ static void
 track_object_removed_cb (GESTimelineObject * object,
     GESTrackObject * track_object, GESTimelineLayer * layer)
 {
+
   if (GES_IS_TRACK_SOURCE (track_object)) {
     g_signal_handlers_disconnect_by_func (track_object, track_object_changed_cb,
         object);
     calculate_transitions (track_object, layer);
   }
-
-  g_object_unref (layer);
   return;
 }
 



More information about the gstreamer-commits mailing list