From c3a8041e0f492b457504ee1789695bfd03a549ed Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 6 Nov 2021 11:53:06 +0200 Subject: [PATCH] bluez5: fix aptx-ll max_frames handling --- spa/plugins/bluez5/a2dp-codec-aptx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/a2dp-codec-aptx.c b/spa/plugins/bluez5/a2dp-codec-aptx.c index 8da062961..7249d50ad 100644 --- a/spa/plugins/bluez5/a2dp-codec-aptx.c +++ b/spa/plugins/bluez5/a2dp-codec-aptx.c @@ -343,6 +343,8 @@ static void *codec_init(const struct a2dp_codec *codec, uint32_t flags, if (this->hd) this->max_frames = (this->mtu - sizeof(struct rtp_header)) / this->frame_length; + else if (codec_is_ll(codec)) + this->max_frames = SPA_MIN(256u, this->mtu) / this->frame_length; else this->max_frames = this->mtu / this->frame_length;