internal/pipewire: increment remote sequence after establishing bounds

This avoids incrementing it twice proceeding from a partial message.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-09 06:21:41 +09:00
parent 5ec4045e24
commit 130add21e5

View File

@@ -681,11 +681,11 @@ func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err erro
if header.Sequence != ctx.remoteSequence { if header.Sequence != ctx.remoteSequence {
return remaining, UnexpectedSequenceError(header.Sequence) return remaining, UnexpectedSequenceError(header.Sequence)
} }
ctx.remoteSequence++
if len(remaining) < int(SizeHeader+header.Size) { if len(remaining) < int(SizeHeader+header.Size) {
return return
} }
ctx.remoteSequence++
proxy, ok := ctx.proxy[header.ID] proxy, ok := ctx.proxy[header.ID]
if !ok { if !ok {