node: we are supposed to produce data when != HAVE_DATA

We can produce data whenever the io area status != HAVE_DATA. We
don't need to look for NEED_DATA.
Also recycling buffer happens whenever the status != HAVE_DATA.
This commit is contained in:
Wim Taymans 2020-02-04 12:59:16 +01:00
parent f9d6a42f63
commit 50ce87df32
6 changed files with 6 additions and 7 deletions

View file

@ -425,7 +425,7 @@ static int process_recycle(struct seq_state *state)
if (!port->valid || io == NULL) if (!port->valid || io == NULL)
continue; continue;
if (io->status == SPA_STATUS_NEED_DATA && if (io->status != SPA_STATUS_HAVE_DATA &&
io->buffer_id < port->n_buffers) { io->buffer_id < port->n_buffers) {
spa_alsa_seq_recycle_buffer(state, port, io->buffer_id); spa_alsa_seq_recycle_buffer(state, port, io->buffer_id);
io->buffer_id = SPA_ID_INVALID; io->buffer_id = SPA_ID_INVALID;

View file

@ -1045,7 +1045,7 @@ static int impl_node_process(void *object)
spa_return_val_if_fail(this != NULL, -EINVAL); spa_return_val_if_fail(this != NULL, -EINVAL);
spa_log_trace_fp(this->log, NAME " %p: process %d", this, this->n_links); spa_log_trace_fp(this->log, NAME " %p: process %d %d", this, this->n_links, this->n_nodes);
while (1) { while (1) {
res = SPA_STATUS_OK; res = SPA_STATUS_OK;

View file

@ -899,7 +899,7 @@ static int impl_node_process(void *object)
io->buffer_id = SPA_ID_INVALID; io->buffer_id = SPA_ID_INVALID;
} }
if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA)) if (!this->props.live)
return make_buffer(this); return make_buffer(this);
else else
return SPA_STATUS_OK; return SPA_STATUS_OK;

View file

@ -688,8 +688,7 @@ static int impl_node_process(void *object)
io->buffer_id = SPA_ID_INVALID; io->buffer_id = SPA_ID_INVALID;
} }
if (this->callbacks.funcs == NULL && if (this->callbacks.funcs == NULL)
(io->status == SPA_STATUS_NEED_DATA))
return make_buffer(this); return make_buffer(this);
else else
return SPA_STATUS_OK; return SPA_STATUS_OK;

View file

@ -784,7 +784,7 @@ static int impl_node_process(void *object)
io->buffer_id = SPA_ID_INVALID; io->buffer_id = SPA_ID_INVALID;
} }
if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA)) if (!this->props.live)
return make_buffer(this); return make_buffer(this);
else else
return SPA_STATUS_OK; return SPA_STATUS_OK;

View file

@ -807,7 +807,7 @@ static int impl_node_process(void *object)
io->buffer_id = SPA_ID_INVALID; io->buffer_id = SPA_ID_INVALID;
} }
if (!this->props.live && (io->status == SPA_STATUS_NEED_DATA)) if (!this->props.live)
return make_buffer(this); return make_buffer(this);
else else
return SPA_STATUS_OK; return SPA_STATUS_OK;