diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 693cdf0c1..cdc2a955c 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1127,7 +1127,7 @@ do_process_done(struct spa_loop *loop, stream->delay = 0; if (stream->direction == PW_DIRECTION_OUTPUT) { - if (stream->last_quantum != 0 && pd->quantum != stream->last_quantum) + if (pd->quantum != stream->last_quantum) stream_update_minreq(stream, pd->minreq); stream->last_quantum = pd->quantum; diff --git a/src/modules/module-protocol-pulse/stream.c b/src/modules/module-protocol-pulse/stream.c index a7b7f3a7d..e38d4c13f 100644 --- a/src/modules/module-protocol-pulse/stream.c +++ b/src/modules/module-protocol-pulse/stream.c @@ -265,14 +265,10 @@ int stream_update_minreq(struct stream *stream, uint32_t minreq) uint32_t new_tlength = minreq + 2 * stream->attr.minreq; uint64_t lat_usec; - if (new_tlength == old_tlength) + if (new_tlength <= old_tlength) return 0; - if (old_tlength > new_tlength) - stream->missing -= old_tlength - new_tlength; - else - stream->missing += new_tlength - old_tlength; - + stream->missing += new_tlength - old_tlength; stream->attr.tlength = new_tlength; if (client->version >= 15) {