module-vban: read the right amount of samples

format_nbs contains the number of samples in the packet minus one.

See #3380
This commit is contained in:
Wim Taymans 2023-08-07 17:36:02 +02:00
parent c53d8ec3db
commit d2c35e6bc7

View file

@ -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) {