[gstreamer-bugs] [Bug 423700] Multiqueue leaks memory when flushing

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu May 24 05:34:39 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=423700

  GStreamer | gstreamer (core) | Ver: 0.10.12

Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #85440|0                           |1
        is obsolete|                            |




------- Comment #4 from Tim-Philipp Müller  2007-05-24 12:34 UTC -------
Created an attachment (id=88729)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=88729&action=view)
alternative patch to fix multiqueue from leaking when flushing

Just looked at this again, I think that the implicit refcounting in
multiqueue/dataqueue is a bit screwy due to the assumed additional mini object
reference passed for the gst_pad_push(). So either data queue needs to drop
this assumed additional reference in addition to destroying the item when it
deletes/drops an item, or multiqueue needs to handle things a bit differently.

I think it makes most sense to go about it like this:
 - whoever owns the GstDataQueueItem, owns a reference to item->object
 - item->destroy() should drop that reference as well
 - when multiqueue does gst_pad_push() or gst_event_push(), it should
   take its own reference for that

This is least confusing IMHO and only requires changes in multiqueue (and some
documentation updates in dataqueue), and also has no adverse effects other than
leaks in case anyone else was already using the dataqueue API.

Patch attached, also enables unit test for this case.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=423700.




More information about the Gstreamer-bugs mailing list