[Bug 683470] Unix socket fd leaks and memory leaks when use pipeline
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Sep 6 03:09:02 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=683470
GStreamer | gstreamer (core) | 0.11.x
--- Comment #13 from zhangyanping <zhangyanping210 at yahoo.com.cn> 2012-09-06 10:08:59 UTC ---
(In reply to comment #11)
> (In reply to comment #9)
> > Acossing to my debuging, I think the source is removed.
> >
> > The leaked fd is created by socketpair. It belongs to the pipeline element, not
> > belongs to src
>
> The socketpair is from the bus object, which is not freed because the source
> has a ref to it and is not freed.
The only way to close the socket is when bus is destroyed. When the bus
destroyed, it call gst_poll_free. In gst_poll_free, it will close the socket.
static void
gst_bus_dispose (GObject * object)
{
GstBus *bus = GST_BUS (object);
if (bus->priv->queue) {
GstMessage *message;
g_mutex_lock (&bus->priv->queue_lock);
do {
message = gst_atomic_queue_pop (bus->priv->queue);
if (message)
gst_message_unref (message);
} while (message != NULL);
gst_atomic_queue_unref (bus->priv->queue);
bus->priv->queue = NULL;
g_mutex_unlock (&bus->priv->queue_lock);
g_mutex_clear (&bus->priv->queue_lock);
if (bus->priv->poll)
gst_poll_free (bus->priv->poll);
bus->priv->poll = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);
}
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list