v4l2bufferpool: Wait before polling if queue is empty
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 3 Jul 2014 19:28:45 +0000 (15:28 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 3 Jul 2014 19:28:45 +0000 (15:28 -0400)
commit652ed3bceb4e31fcd5dea9fdc9525fafb3350968
treef3a5be7f3614e4a865ee73f511dc028ba17dbfd7
parentdb1d9444d67d89d66d0652562cab76b9d438b68e
v4l2bufferpool: Wait before polling if queue is empty

In kernel before 3.17, polling during queue underrun would unblock right
away and trigger POLLERR. As we are not handling POLLERR, we would endup
blocking in DQBUF call, which won't be unblocked correctly when going
to NULL state. A deadlock at start caused by locking error in libv4l2 was
also seen before this patch. Instead, we wait until the queue is no longer
empty before polling.

https://bugzilla.gnome.org/show_bug.cgi?id=731015
sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2bufferpool.h