GESTimelineObject: Don't leak a reference when creating TrackObject

This commit is contained in:
Edward Hervey 2010-03-13 15:52:14 +01:00
parent 62c24ee380
commit 83cc796cc9
2 changed files with 3 additions and 5 deletions

View file

@ -193,8 +193,8 @@ ges_timeline_object_create_track_object (GESTimelineObject * object,
ges_track_object_set_timeline_object (res, object);
GST_DEBUG ("Adding TrackObject to the list of controlled track objects");
object->trackobjects =
g_list_append (object->trackobjects, g_object_ref (res));
/* We steal the initial reference */
object->trackobjects = g_list_append (object->trackobjects, res);
GST_DEBUG ("Setting properties on newly created TrackObject");

View file

@ -49,13 +49,11 @@ GST_START_TEST (test_filesource_basic)
fail_unless (trackobject != NULL);
/* The track holds a reference to the object */
ASSERT_OBJECT_REFCOUNT (trackobject, "Track Object", 2);
ASSERT_OBJECT_REFCOUNT (trackobject, "Track Object", 1);
fail_unless (ges_timeline_object_release_track_object (GES_TIMELINE_OBJECT
(source), trackobject) == TRUE);
ASSERT_OBJECT_REFCOUNT (trackobject, "Track Object", 1);
g_object_unref (source);
g_object_unref (track);
}