[gstreamer-bugs] [Bug 557710] New: Memory leak related to matroskamux's request pads
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Fri Oct 24 00:47:52 PDT 2008
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=557710
GStreamer | gst-plugins-good | Ver: HEAD CVS
Summary: Memory leak related to matroskamux's request pads
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: pkj at axis.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
I found two problems related to the request pads used by the matroskamux
element.
The first problem is that if you create a matroskamux element and add it to a
pipeline, but never set the pipeline to playing, gst_matroska_pad_free() is
never called and we leak memory. This can be fixed by using
gst_collect_pads_add_pad_full() instead of gst_collect_pads_add_pad() and
specifying gst_matroska_pad_free() as the destroy notifier.
The second problem is if one actually tries to do the right thing and call
gst_element_release_request_pad() on the requested pad from matroskamux. Then
this will fail with a warning about an unknown pad. This is because the code in
gst_matroska_mux_release_pad() only works for pads which currently have
collected data (which of course will not happen if the pipeline hasn't been
running...)
gst_matroska_mux_release_pad() should always call gst_collect_pads_remove_pad()
and gst_element_remove_pad() for all pads, regardless of whether they've
collected any data or not.
The attached patch should fix both of the problems described above.
--
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=557710.
More information about the Gstreamer-bugs
mailing list