mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
GESTimelineObject: Don't leak a reference when creating TrackObject
This commit is contained in:
parent
62c24ee380
commit
83cc796cc9
2 changed files with 3 additions and 5 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue