camera: send GST_EVENT_LIVE_FLUSH in ::unblock
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Fri, 6 May 2011 14:02:26 +0000 (16:02 +0200)
committerDaniel Diaz <ddiaz@ti.com>
Thu, 23 Jun 2011 21:18:37 +0000 (16:18 -0500)
commitdc67128f96d0f5cdf794c0398eaec295c3dad274
treebff3bbcce7a03a9ae2b6fc9f80b673dda5db6a87
parentd5f277d21358502c3de2ddfdff3be3da456ff9d2
camera: send GST_EVENT_LIVE_FLUSH in ::unblock

When setting omx_camera from PLAYING to PAUSED, it can happen that ::create is
blocked in buffer_alloc, blocking on v4l2sink. That's a source of possible
deadlocks since in PAUSED v4l2sink stops processing buffers and so buffer_alloc
can wait forever.

We avoid this sending a GST_EVENT_LIVE_FLUSH event (similar to a FLUSH_START
event, but it doesn't reset the running-time, nor sets pads flushing etc) to
instruct v4l2sink to unblock.
omx/gstomx_base_src.c