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.
This commit is contained in:
Sebastian Dröge 2011-07-07 10:27:31 +02:00
parent 46fe757270
commit d9e2391448

View file

@ -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"));