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
This commit is contained in:
Wim Taymans 2022-09-21 11:31:12 +02:00
parent bd584ca8c0
commit 00a234daf2

View file

@ -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);