gst_omx_component_get_state() used to early return if there was no
pending state change. So if the component raised an error it wasn't
considered in the invalid state until the next requested state change.
Fix this by checking first if we received an error.
https://bugzilla.gnome.org/show_bug.cgi?id=795874
gst_omx_component_handle_messages (comp);
- ret = comp->state;
- if (comp->pending_state == OMX_StateInvalid)
- goto done;
-
if (comp->last_error != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent, "Component %s in error state: %s (0x%08x)",
comp->name, gst_omx_error_to_string (comp->last_error),
goto done;
}
+ ret = comp->state;
+ if (comp->pending_state == OMX_StateInvalid)
+ goto done;
+
while (signalled && comp->last_error == OMX_ErrorNone
&& comp->pending_state != OMX_StateInvalid) {