From 8a669ee3080c64f3d5876ca04eaa7727c2f76195 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 21 Jun 2012 20:21:03 +0300 Subject: [PATCH] omx: use recursive_lock inside set_last_error(), since this function may be called from an event handler --- omx/gstomx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 59bd87f..1894b71 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -734,14 +734,14 @@ gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err) GST_ERROR_OBJECT (comp->parent, "Setting last error: %s (0x%08x)", gst_omx_error_to_string (err), err); - gst_omx_rec_mutex_lock (&comp->state_lock); + gst_omx_rec_mutex_recursive_lock (&comp->state_lock); /* We only set the first error ever from which * we can't recover anymore. */ if (comp->last_error == OMX_ErrorNone) comp->last_error = err; g_cond_broadcast (comp->state_cond); - gst_omx_rec_mutex_unlock (&comp->state_lock); + gst_omx_rec_mutex_recursive_unlock (&comp->state_lock); /* Now notify all ports, no locking needed * here because the ports are allocated in the @@ -752,9 +752,9 @@ gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err) for (i = 0; i < n; i++) { GstOMXPort *tmp = g_ptr_array_index (comp->ports, i); - gst_omx_rec_mutex_lock (&tmp->port_lock); + gst_omx_rec_mutex_recursive_lock (&tmp->port_lock); g_cond_broadcast (tmp->port_cond); - gst_omx_rec_mutex_unlock (&tmp->port_lock); + gst_omx_rec_mutex_recursive_unlock (&tmp->port_lock); } } -- 2.7.4