null-sink: fix null sink scheduling

The null sink pulls in data and provides data after it got the
data in _process.

See #472 #442
This commit is contained in:
Wim Taymans 2020-12-14 10:21:13 +01:00
parent 0f528dc73c
commit c6f94def08

View file

@ -242,8 +242,7 @@ static void on_timeout(struct spa_source *source)
this->clock->next_nsec = this->next_time; this->clock->next_nsec = this->next_time;
} }
spa_node_call_ready(&this->callbacks, spa_node_call_ready(&this->callbacks, SPA_STATUS_NEED_DATA);
SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA);
set_timer(this, this->next_time); set_timer(this, this->next_time);
} }
@ -659,7 +658,7 @@ static int impl_node_process(void *object)
io->status = -EINVAL; io->status = -EINVAL;
return io->status; return io->status;
} }
io->status = SPA_STATUS_NEED_DATA; io->status = SPA_STATUS_OK;
return SPA_STATUS_HAVE_DATA; return SPA_STATUS_HAVE_DATA;
} }