[Bug 731015] v4l2src: deadlock on shutdown

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri May 30 16:36:15 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=731015
  GStreamer | gst-plugins-good | git

Nicolas Dufresne <nicolas.dufresne> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
     Ever Confirmed|0                           |1

--- Comment #3 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2014-05-30 23:36:12 UTC ---
Ok, this only occurs with libv4l2, due to a bug in libv4l2, but also a bug in
GStreamer, which is that we don't check polling errors and endup blocking  in
dqbuf.

Now, interesting fact:

This works more often:

gst-launch-1.0 v4l2src ! video/x-raw,format=YUY2 ! videoconvert ! ...

In both cases, our pool size is 2, but in the default case, a conversion to RGB
is being done in libv4l2, holding the lock ! The driver goes low on buffers,
and then report an error during poll, most likely to say, hey, I've lost a
frame.

Having more buffers helps, but waste a lot of memory for other uses cases, and
on embedded devices. Loosing frames is most likely fine if too slow, we should
send gaps. While doing so, some buffers should come back and as we will block
on the stream for one frame, it will give time for the device to recover. I
have a first patch where are simply spin in the poll on error, not ideal but
works. Posting here, I'll finish it later.

-- 
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