From 84bb897886f9b1be027d55411e8f888d2878bbb5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 7 Mar 2019 18:31:37 +0100 Subject: [PATCH] stream: first prepare output io, then call the ready callback It is assumed that the output io area is ready when the ready callback is called so that the next elements in the graph can be triggered immediately. When the graph finishes, the node that triggered the ready (the driver) is scheduled to recycle and complete the graph. --- src/pipewire/stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index f94a71611..ec19115ee 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1337,8 +1337,10 @@ do_process(struct spa_loop *loop, bool async, uint32_t seq, const void *data, size_t size, void *user_data) { struct stream *impl = user_data; - impl->callbacks->ready(impl->callbacks_data, SPA_STATUS_HAVE_BUFFER); - return 0; + int res; + + res = impl_node_process_output(&impl->impl_node); + return impl->callbacks->ready(impl->callbacks_data, res); } static inline int call_trigger(struct stream *impl)