From 00a234daf24914c475d17059b943d85361607d20 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 21 Sep 2022 11:31:12 +0200 Subject: [PATCH] pulse-server: limit capture blocks to fragsize Don't send larger chunks than the fragsize. Some clients don't like this. Also checked with #2418. Fixes #2711 --- src/modules/module-protocol-pulse/pulse-server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 42f1996c4..b2feb19d9 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1343,6 +1343,7 @@ do_process_done(struct spa_loop *loop, while ((uint32_t)avail >= stream->attr.fragsize) { towrite = SPA_MIN(avail, MAX_BLOCK); + towrite = SPA_MIN((uint32_t)avail, stream->attr.fragsize); towrite = SPA_ROUND_DOWN(towrite, stream->frame_size); msg = message_alloc(impl, stream->channel, towrite);