bluez5: fix ISO sequence numbering

Pass zero-length packets to the codec. BAP/ISO may use these to indicate
missing data.

Fix A2DP codecs to not parse input with spa_return_val_if_fail, that's
meant for assertions. Just return -EINVAL directly, it's normal that
input data may contain garbage.
This commit is contained in:
Pauli Virtanen 2025-06-27 21:30:55 +03:00 committed by Wim Taymans
parent 02d5d9bc1f
commit ff81fc9f7b
10 changed files with 31 additions and 11 deletions

View file

@ -1188,7 +1188,8 @@ static SPA_UNUSED int codec_start_decode (void *data,
const struct rtp_payload *payload = SPA_PTROFF(src, sizeof(struct rtp_header), void);
size_t header_size = sizeof(struct rtp_header) + sizeof(struct rtp_payload);
spa_return_val_if_fail (src_size > header_size, -EINVAL);
if (src_size <= header_size)
return -EINVAL;
if (seqnum)
*seqnum = ntohs(header->sequence_number);