audioconvert: fix scheduling

This commit is contained in:
Wim Taymans 2018-05-10 11:28:59 +02:00
parent 22b8a6f01a
commit 97473c8e8b
2 changed files with 10 additions and 5 deletions

View file

@ -808,11 +808,16 @@ static int impl_node_process(struct spa_node *node)
spa_log_trace(this->log, NAME " %p: process %d", this, this->n_links);
for (i = 1; i < this->n_links; i++) {
res = spa_node_process(this->links[i].out_node);
if (!SPA_FLAG_CHECK(res, SPA_STATUS_HAVE_BUFFER)) {
if (SPA_FLAG_CHECK(res, SPA_STATUS_NEED_BUFFER) && i == 1)
int r = spa_node_process(this->links[i].out_node);
if (i == 1)
res |= r & SPA_STATUS_NEED_BUFFER;
if (i == this->n_links - 1)
res |= r & SPA_STATUS_HAVE_BUFFER;
if (!SPA_FLAG_CHECK(r, SPA_STATUS_HAVE_BUFFER)) {
if (SPA_FLAG_CHECK(r, SPA_STATUS_NEED_BUFFER) && i == 1)
break;
i = 0;
i = res = SPA_STATUS_OK;
continue;
}
}

View file

@ -824,7 +824,7 @@ static int impl_node_process(struct spa_node *node)
inio->status = SPA_STATUS_NEED_BUFFER;
return outio->status;
return SPA_STATUS_HAVE_BUFFER | SPA_STATUS_NEED_BUFFER;
}
static const struct spa_node impl_node = {