From c8fc79bad281899bfe56a8b5b41aeb90da514c52 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 16 Dec 2021 17:10:30 +0100 Subject: [PATCH] Revert "pulse-server: only try to increase the tlength" This reverts commit 7f0255f4ce689567518dbbedf06fd8d3a1d3f008. Doesn't work with small quant for some reason. --- src/modules/module-protocol-pulse/stream.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/stream.c b/src/modules/module-protocol-pulse/stream.c index 41ad97ebe..a7b7f3a7d 100644 --- a/src/modules/module-protocol-pulse/stream.c +++ b/src/modules/module-protocol-pulse/stream.c @@ -265,10 +265,13 @@ int stream_update_minreq(struct stream *stream, uint32_t minreq) uint32_t new_tlength = minreq + 2 * stream->attr.minreq; uint64_t lat_usec; - if (old_tlength >= new_tlength) + if (new_tlength == old_tlength) return 0; - stream->missing += new_tlength - old_tlength; + if (old_tlength > new_tlength) + stream->missing -= old_tlength - new_tlength; + else + stream->missing += new_tlength - old_tlength; stream->attr.tlength = new_tlength;