summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2018-05-07 11:59:08 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2018-06-08 09:36:56 +0200
commit3498f81d1f40fbda563863f2fc41d20e85c15907 (patch)
tree2cb6c4f0e5327acc68a92a3add1cb2799ec050a4
parentebcadd998484a7ff69d54d0b878aae1c66715aab (diff)
downloadgst-omx-3498f81d1f40fbda563863f2fc41d20e85c15907.tar.gz
omx: always consider component in 'invalid' state when an error occured
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
-rw-r--r--omx/gstomx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index b16cf50..6276fea 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -972,10 +972,6 @@ gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout)
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),
@@ -984,6 +980,10 @@ gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout)
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) {