omx: Fix deadlock between ending a flush and the event handler

gst_omx_port_set_flushing() calls OMX_FillThisBuffer at the end of a flush
without releasing the port lock, and this can cause a deadlock with the
EventHandler. This patches fixes this by dropping the lock for the duration of
the fill buffer call.
This commit is contained in:
Arun Raghavan 2012-04-25 16:35:40 +05:30
parent d99fa5e3b3
commit 036cd16756

View file

@ -1220,7 +1220,9 @@ gst_omx_port_set_flushing (GstOMXPort * port, gboolean flush)
* valid anymore after the buffer was consumed
*/
buf->omx_buf->nFlags = 0;
g_mutex_unlock (port->port_lock);
err = OMX_FillThisBuffer (comp->handle, buf->omx_buf);
g_mutex_lock (port->port_lock);
if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent,
"Failed to pass buffer %p (%p) to port %u: %s (0x%08x)", buf,