libv4l2: release the lock before doing a DQBUF
authorThiago Santos <ts.santos@sisa.samsung.com>
Mon, 9 Jun 2014 13:51:56 +0000 (10:51 -0300)
committerHans Verkuil <hans.verkuil@cisco.com>
Mon, 16 Jun 2014 10:17:45 +0000 (12:17 +0200)
commit92b1b43071432014cb9f5840e224fb81c64aa8f2
treec35967f2f2146ffcdbbe8ba885e51b21dc11fcf4
parent024691919c2b41aa337184c52ec09caaed21a10e
libv4l2: release the lock before doing a DQBUF

In blocking mode, if there are no buffers available the DQBUF will block
waiting for a QBUF to be called but it will block holding the streaming
lock which will prevent any QBUF from happening, causing a deadlock.

Signed-off-by: Thiago Santos <ts.santos@sisa.samsung.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
lib/libv4l2/libv4l2-priv.h
lib/libv4l2/libv4l2.c