GNOME Bugzilla – Bug 446763
[identity] leaks events in single segment mode
Last modified: 2008-05-20 08:28:13 UTC
Patch to add event unref inside identity. These unrefs avoid memleak for us.
Created attachment 89812 [details] [review] add event unref
I don't think the GstBaseTransformClass::event vfunc is supposed to ever take ownership of the event. Seems more likely to me that gst_base_transform_sink_event() is missing a if (ret) ret = gst_pad_push_event (trans->srcpad, event); + else + gst_event_unref (event); otherwise ownership semantics would be a bit weird IMHO.
Created attachment 111038 [details] [review] basetransform-event-leak.diff The docs say for the ::event vfunc: Optional. Event handler on the sink pad. This function should return TRUE if the base class should forward the event. So, IMHO the attached patch (i.e. Tim's change) should be done.
2008-05-20 Sebastian Dröge <slomo@circular-chaos.org> Patch by: Tim-Philipp Müller <tim.muller at collabora co uk> * libs/gst/base/gstbasetransform.c: (gst_base_transform_sink_event): Unref events that the GstBaseTransform::event vfunc didn't want to have forwarded by the base class. Closes a leak in identity. Fixes bug #446763.