After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 446763 - [identity] leaks events in single segment mode
[identity] leaks events in single segment mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-12 14:43 UTC by Laurent Glayal
Modified: 2008-05-20 08:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add event unref (990 bytes, patch)
2007-06-12 14:44 UTC, Laurent Glayal
none Details | Review
basetransform-event-leak.diff (619 bytes, patch)
2008-05-17 10:25 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Laurent Glayal 2007-06-12 14:43:51 UTC
Patch to add event unref inside identity. These unrefs avoid memleak for us.
Comment 1 Laurent Glayal 2007-06-12 14:44:18 UTC
Created attachment 89812 [details] [review]
add event unref
Comment 2 Tim-Philipp Müller 2007-06-12 15:48:02 UTC
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.

Comment 3 Sebastian Dröge (slomo) 2008-05-17 10:25:10 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2008-05-20 08:28:13 UTC
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.