From 830e81f20078606dc5862b0934ba22176b21dc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ordo=C3=B1ez=20M=C3=BCller=2C=20Antonio?= Date: Tue, 24 Mar 2026 12:47:19 +0100 Subject: [PATCH] rearrange code --- spa/plugins/videotestsrc/videotestsrc.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index db5c90113..c3e9f8700 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -334,6 +334,20 @@ static void on_output(void* data, uint64_t expirations) spa_node_call_ready(&this->callbacks, res); } +static inline void reuse_buffer(struct impl *this, struct port *port, uint32_t id) +{ + struct buffer *b = &port->buffers[id]; + spa_return_if_fail(b->outstanding); + + spa_log_trace(this->log, "%p: reuse buffer %d", this, id); + + b->outstanding = false; + spa_list_append(&port->empty, &b->link); + + if (!this->props.live) + set_timer(this, true); +} + static int impl_node_send_command(void *object, const struct spa_command *command) { struct impl *this = object; @@ -746,20 +760,6 @@ impl_node_port_set_io(void *object, return 0; } -static inline void reuse_buffer(struct impl *this, struct port *port, uint32_t id) -{ - struct buffer *b = &port->buffers[id]; - spa_return_if_fail(b->outstanding); - - spa_log_trace(this->log, "%p: reuse buffer %d", this, id); - - b->outstanding = false; - spa_list_append(&port->empty, &b->link); - - if (!this->props.live) - set_timer(this, true); -} - static int impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id) { struct impl *this = object;