From d9e239144814c90c5964f9b2e694b2fd0a859e52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Jul 2011 10:27:31 +0200 Subject: [PATCH] omx: Always check if the component is in an error state before waiting for a condition variable to be signalled Otherwise we might wait forever because nothing is going to signal the condition variable anymore. --- omx/gstomx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/omx/gstomx.c b/omx/gstomx.c index 3defa83..cba1c2a 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -1112,6 +1112,11 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled) comp = port->comp; + if ((err = gst_omx_component_get_last_error (comp)) != OMX_ErrorNone) { + GST_ERROR_OBJECT (comp->parent, "Component in error state: %d", err); + goto done; + } + GST_DEBUG_OBJECT (comp->parent, "Setting port %u to %s", port->index, (enabled ? "enabled" : "disabled")); -- 2.7.4