From b0853ad34a2b08d873391a93973c4275a7c31f88 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 21 Dec 2022 16:40:28 +0200 Subject: [PATCH] bluez5: media-sink: set initial latency after getting transport The call to set_latency doesn't do anything, before transport has been set. --- spa/plugins/bluez5/media-sink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/media-sink.c b/spa/plugins/bluez5/media-sink.c index ee6cef4ce..4bf7310cf 100644 --- a/spa/plugins/bluez5/media-sink.c +++ b/spa/plugins/bluez5/media-sink.c @@ -1754,7 +1754,6 @@ impl_init(const struct spa_handle_factory *factory, port->latency = SPA_LATENCY_INFO(SPA_DIRECTION_INPUT); port->latency.min_quantum = 1.0f; port->latency.max_quantum = 1.0f; - set_latency(this, false); spa_list_init(&port->ready); @@ -1800,6 +1799,8 @@ impl_init(const struct spa_handle_factory *factory, reset_props(this, &this->props); + set_latency(this, false); + spa_bt_transport_add_listener(this->transport, &this->transport_listener, &transport_events, this);