From d2c35e6bc774e87b57d9e9ae8110108d32c8bf7a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 7 Aug 2023 17:36:02 +0200 Subject: [PATCH] module-vban: read the right amount of samples format_nbs contains the number of samples in the packet minus one. See #3380 --- src/modules/module-vban/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-vban/audio.c b/src/modules/module-vban/audio.c index 1b1b66825..f38d3ac38 100644 --- a/src/modules/module-vban/audio.c +++ b/src/modules/module-vban/audio.c @@ -103,7 +103,7 @@ static int vban_audio_receive(struct impl *impl, uint8_t *buffer, ssize_t len) hlen = VBAN_HEADER_SIZE; plen = len - hlen; - samples = SPA_MIN(hdr->format_nbs, plen / stride); + samples = SPA_MIN(hdr->format_nbs+1, plen / stride); n_frames = hdr->n_frames; if (impl->have_sync && impl->n_frames != n_frames) {