mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: increase maxlength to match tlength
When we need to increase tlength because of a quantum change, increase maxlength as well, but clamp it to MAXLENGTH. See #2069
This commit is contained in:
parent
1ac1f914e3
commit
ce03fc7c15
1 changed files with 5 additions and 1 deletions
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "client.h"
|
||||
#include "commands.h"
|
||||
#include "defs.h"
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "message.h"
|
||||
|
|
@ -331,9 +332,12 @@ int stream_update_minreq(struct stream *stream, uint32_t minreq)
|
|||
if (new_tlength <= old_tlength)
|
||||
return 0;
|
||||
|
||||
if (new_tlength > MAXLENGTH)
|
||||
new_tlength = MAXLENGTH;
|
||||
|
||||
stream->attr.tlength = new_tlength;
|
||||
if (stream->attr.tlength > stream->attr.maxlength)
|
||||
stream->attr.tlength = stream->attr.maxlength;
|
||||
stream->attr.maxlength = stream->attr.tlength;
|
||||
|
||||
if (client->version >= 15) {
|
||||
struct message *msg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue