mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
Remember the last_error after a failed set state call to avoid blocking the next get state call
gst_omx_video_dec_flush() blocks forever in http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideodec.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n2110 when the previous call to gst_omx_component_set_state() fails in http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n827. To mitigate that, I set "last_error" to true, so the code in http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n862 exits early and doesn't block. https://bugzilla.gnome.org/show_bug.cgi?id=758274
This commit is contained in:
parent
d1a79d7c59
commit
271093d633
1 changed files with 7 additions and 0 deletions
|
@ -830,6 +830,13 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state)
|
||||||
done:
|
done:
|
||||||
|
|
||||||
gst_omx_component_handle_messages (comp);
|
gst_omx_component_handle_messages (comp);
|
||||||
|
|
||||||
|
if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) {
|
||||||
|
GST_ERROR_OBJECT (comp->parent,
|
||||||
|
"Last operation returned an error. Setting last_error manually.");
|
||||||
|
comp->last_error = err;
|
||||||
|
}
|
||||||
|
|
||||||
g_mutex_unlock (&comp->lock);
|
g_mutex_unlock (&comp->lock);
|
||||||
|
|
||||||
if (err != OMX_ErrorNone) {
|
if (err != OMX_ErrorNone) {
|
||||||
|
|
Loading…
Reference in a new issue