GNOME Bugzilla – Bug 782652
ges: Correctly handling floating references
Last modified: 2018-11-03 12:53:58 UTC
ges_timeline_element_set_parent() needs a decision about how it should exactly work.
Created attachment 351873 [details] [review] ges: Correctly handling floating references If we ref_sink() a parameter, it must be marked as (transfer floating) and it also has to be handled consistently between error and normal cases. See https://bugzilla.gnome.org/show_bug.cgi?id=782499
Created attachment 351879 [details] [review] ges: Correctly handling floating references If we ref_sink() a parameter, it must be marked as (transfer floating) and it also has to be handled consistently between error and normal cases. See https://bugzilla.gnome.org/show_bug.cgi?id=782499
Review of attachment 351879 [details] [review]: ::: ges/ges-timeline-element.c @@ +543,2 @@ self->parent = parent; + gst_object_ref_sink (self); This breaks the unit tests (and causes leaks), because at least sometimes something else already removed the floating reference flag and then this now increases the reference count. What to do?
(In reply to Sebastian Dröge (slomo) from comment #3) > Review of attachment 351879 [details] [review] [review]: > > ::: ges/ges-timeline-element.c > @@ +543,2 @@ > self->parent = parent; > + gst_object_ref_sink (self); > > This breaks the unit tests (and causes leaks), because at least sometimes > something else already removed the floating reference flag and then this now > increases the reference count. > > What to do? I changed the doc as it was wrong, ownership for GESTimelineElement is either the timeline (for clips or groups), or the Track for GESTrackElement. The parent owns a hard ref.
commit be6757424509e1c072d6429cf93715e3311f43fb Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon May 15 09:13:38 2017 +0200 ges: Correctly handling floating references If we ref_sink() a parameter, it must be marked as (transfer floating) and it also has to be handled consistently between error and normal cases. See https://bugzilla.gnome.org/show_bug.cgi?id=782499 https://bugzilla.gnome.org/show_bug.cgi?id=782652 Thanks, your patch was correct, the doc needed minor fixing.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/34.