Small cleanups

This commit is contained in:
Wim Taymans 2017-10-16 18:09:59 +02:00
parent 574c6d4b90
commit ce6b75cf63
7 changed files with 8 additions and 18 deletions

View file

@ -48,7 +48,8 @@ static inline int spa_graph_impl_need_input(void *data, struct spa_graph_node *n
if (pnode->ready_link.next == NULL)
spa_list_append(&ready, &pnode->ready_link);
}
else if (pport->io->status == SPA_RESULT_OK && !(pnode->flags & SPA_GRAPH_NODE_FLAG_ASYNC))
else if (pport->io->status == SPA_RESULT_OK &&
!(pnode->flags & SPA_GRAPH_NODE_FLAG_ASYNC))
node->ready[SPA_DIRECTION_INPUT]++;
}
@ -69,7 +70,8 @@ static inline int spa_graph_impl_need_input(void *data, struct spa_graph_node *n
spa_debug("node %p ready:%d required:%d", node, node->ready[SPA_DIRECTION_INPUT], node->required[SPA_DIRECTION_INPUT]);
if (node->required[SPA_DIRECTION_INPUT] > 0 && node->ready[SPA_DIRECTION_INPUT] == node->required[SPA_DIRECTION_INPUT]) {
if (node->required[SPA_DIRECTION_INPUT] > 0 &&
node->ready[SPA_DIRECTION_INPUT] == node->required[SPA_DIRECTION_INPUT]) {
node->state = spa_node_process_input(node->implementation);
spa_debug("node %p processed in %d", node, node->state);
if (node->state == SPA_RESULT_HAVE_BUFFER) {

View file

@ -636,12 +636,6 @@ static struct spa_buffer *find_free_buffer(struct impl *this, struct port *port)
return b->outbuf;
}
static inline void release_buffer(struct impl *this, struct spa_buffer *buffer)
{
if (this->callbacks && this->callbacks->reuse_buffer)
this->callbacks->reuse_buffer(this->callbacks_data, 0, buffer->id);
}
static void do_volume(struct impl *this, struct spa_buffer *dbuf, struct spa_buffer *sbuf)
{
uint32_t si, di, i, n_samples, n_bytes, soff, doff;
@ -703,7 +697,6 @@ static int impl_node_process_input(struct spa_node *node)
if (output->status == SPA_RESULT_HAVE_BUFFER)
return SPA_RESULT_HAVE_BUFFER;
in_port = &this->in_ports[0];
input = in_port->io;
spa_return_val_if_fail(input != NULL, SPA_RESULT_ERROR);