goto done;
}
- if (port->flushing) {
- GST_DEBUG_OBJECT (comp->parent, "%s port %u is flushing, not releasing "
- "buffer", comp->name, port->index);
+ if (port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+ GST_DEBUG_OBJECT (comp->parent,
+ "%s port %u is flushing or disabled, not releasing " "buffer",
+ comp->name, port->index);
g_queue_push_tail (&port->pending_buffers, buf);
gst_omx_component_send_message (comp, NULL);
goto done;
else
port->disabled_pending = TRUE;
- if (!enabled) {
- /* This is also like flushing, i.e. all buffers are returned
- * by the component and no new buffers should be passed to
- * the component anymore */
- port->flushing = TRUE;
- }
-
if (enabled)
err =
OMX_SendCommand (comp->handle, OMX_CommandPortEnable, port->index,
gst_omx_component_handle_messages (comp);
- if (port->flushing) {
- GST_DEBUG_OBJECT (comp->parent, "%s port %u is flushing", comp->name,
- port->index);
+ if (port->flushing || port->disabled_pending || !port->port_def.bEnabled) {
+ GST_DEBUG_OBJECT (comp->parent, "%s port %u is flushing or disabled",
+ comp->name, port->index);
err = OMX_ErrorIncorrectStateOperation;
goto done;
}
err = last_error;
} else {
if (enabled) {
- port->flushing = FALSE;
/* Reset EOS flag */
port->eos = FALSE;
}