v4l2videodec: Handle flush while in start_streaming
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 16 May 2014 21:46:30 +0000 (17:46 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Sat, 17 May 2014 01:49:00 +0000 (21:49 -0400)
commit7df99f74698fd9806054b207f3d7228efd192f8e
tree93d3f7a94c54bd6843bdf2d87aecc960935afa23
parent58716e054f96bb42b9b7ae20d9964174e13714bb
v4l2videodec: Handle flush while in start_streaming

We need to handle the case where a flush occure while the streaming
thread is being brought up. In this case, the flushing state of the poll
object is cleared. To solve this, we simply set the capture poll to flushing
again, this way we know the thread will exit. The decoder streamlock
is used to synchronize with handle frame.
sys/v4l2/gstv4l2videodec.c