[Bug 742074] New: v4l2videodec: leaks filedescriptors
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Dec 28 13:54:56 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=742074
GStreamer | gst-plugins-good | git
Summary: v4l2videodec: leaks filedescriptors
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: sjoerd at luon.net
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=293414)
--> (https://bugzilla.gnome.org/attachment.cgi?id=293414)
Strawmen patch
After playing back a video file on exynos 2 file descriptors stay open
referring to the video device. Tracing those down points to the BufferPool and
Allocate attached to the src pad (output object).
What happens when the decoder is torn down is that the pool is de-activate and
dropped (from gst_v4l2_object_stop):
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
gst_object_unref (v4l2object->pool);
v4l2object->pool = NULL;
The idea being that the BufferPool will get disposed once all buffers have been
returned to it. However for _OUTPUT the buffers enqueued in the video device
are also acquired out of the pool (as opposed to _CAPTURE buffers, which are
seenas "in" the pool while enqueued). Unfortunately, this means that if there
are any buffers still enqueued in the _OUTPUT queue when gst_v4l2_object_stop
is called, then the BufferPool will never get all its buffers back, thus never
gets cleaned up.
This is "solved" in the attached patch by calling stream off and dropping all
enqueued buffers once the pool is set to flushing. However I'm not entirely
happy with that solution, it might be nicer & more in line with the handling
of_CAPTURE buffers to regard enqueued _OUTPUT buffers as part of the pool
rather then buffers taken out of the pool, which prevents this issue and might
make the handling more aligned.
--
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