mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
omx: Only disabling of a port is like flushing, enabling is like unflushing
This commit is contained in:
parent
c144ebd054
commit
47d66cadfa
1 changed files with 9 additions and 7 deletions
|
@ -1494,10 +1494,12 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
|
||||||
|
|
||||||
port->enabled_changed = FALSE;
|
port->enabled_changed = FALSE;
|
||||||
|
|
||||||
|
if (!enabled) {
|
||||||
/* This is also like flushing, i.e. all buffers are returned
|
/* This is also like flushing, i.e. all buffers are returned
|
||||||
* by the component and no new buffers should be passed to
|
* by the component and no new buffers should be passed to
|
||||||
* the component anymore */
|
* the component anymore */
|
||||||
port->flushing = TRUE;
|
port->flushing = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
g_mutex_unlock (port->port_lock);
|
g_mutex_unlock (port->port_lock);
|
||||||
if (enabled)
|
if (enabled)
|
||||||
|
@ -1584,8 +1586,6 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
|
||||||
&port->port_def);
|
&port->port_def);
|
||||||
}
|
}
|
||||||
|
|
||||||
port->flushing = FALSE;
|
|
||||||
|
|
||||||
if (!signalled) {
|
if (!signalled) {
|
||||||
GST_ERROR_OBJECT (comp->parent,
|
GST_ERROR_OBJECT (comp->parent,
|
||||||
"Timeout waiting for port %u to be %s", port->index,
|
"Timeout waiting for port %u to be %s", port->index,
|
||||||
|
@ -1599,6 +1599,9 @@ gst_omx_port_set_enabled_unlocked (GstOMXPort * port, gboolean enabled)
|
||||||
gst_omx_error_to_string (err), err);
|
gst_omx_error_to_string (err), err);
|
||||||
err = last_error;
|
err = last_error;
|
||||||
} else {
|
} else {
|
||||||
|
if (enabled)
|
||||||
|
port->flushing = FALSE;
|
||||||
|
|
||||||
/* If everything went fine and we have an output port we
|
/* If everything went fine and we have an output port we
|
||||||
* should provide all newly allocated buffers to the port
|
* should provide all newly allocated buffers to the port
|
||||||
*/
|
*/
|
||||||
|
@ -1638,7 +1641,6 @@ error:
|
||||||
* set_last_error() needs all port locks.
|
* set_last_error() needs all port locks.
|
||||||
* This is safe here because we're just going
|
* This is safe here because we're just going
|
||||||
* to error out anyway */
|
* to error out anyway */
|
||||||
port->flushing = FALSE;
|
|
||||||
g_mutex_unlock (port->port_lock);
|
g_mutex_unlock (port->port_lock);
|
||||||
gst_omx_component_set_last_error (comp, err);
|
gst_omx_component_set_last_error (comp, err);
|
||||||
g_mutex_lock (port->port_lock);
|
g_mutex_lock (port->port_lock);
|
||||||
|
|
Loading…
Reference in a new issue