From a58d8150249c31d3bb37844ec98563eddd5cf143 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 30 May 2022 09:54:22 +0200 Subject: [PATCH] bluez5: implement freewheel in sink We need to skip all samples. --- spa/plugins/bluez5/a2dp-sink.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index eae0843d9..2e08f7407 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -1460,6 +1460,11 @@ static int impl_node_process(void *object) io = port->io; spa_return_val_if_fail(io != NULL, -EIO); + if (this->position && this->position->clock.flags & SPA_IO_CLOCK_FLAG_FREEWHEEL) { + io->status = SPA_STATUS_NEED_DATA; + return SPA_STATUS_HAVE_DATA; + } + if (io->status == SPA_STATUS_HAVE_DATA && io->buffer_id < port->n_buffers) { struct buffer *b = &port->buffers[io->buffer_id];