mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
raop: Silently drop out-of-history retransmission request
This commit is contained in:
parent
516906aef9
commit
b81ceb6707
1 changed files with 4 additions and 2 deletions
|
|
@ -142,13 +142,15 @@ pa_memchunk *pa_raop_packet_buffer_retrieve(pa_raop_packet_buffer *pb, uint16_t
|
|||
if (seq < pb->seq) {
|
||||
/* Regular case: pb->seq did not wrapped since seq. */
|
||||
delta = pb->seq - seq;
|
||||
pa_assert(delta <= pb->count);
|
||||
} else {
|
||||
/* Tricky case: pb->seq wrapped since seq! */
|
||||
delta = pb->seq + (UINT16_MAX - seq);
|
||||
pa_assert(delta <= pb->count);
|
||||
}
|
||||
|
||||
/* If the requested packet is too old, do nothing and return */
|
||||
if (delta > pb->count)
|
||||
return NULL;
|
||||
|
||||
i = (pb->size + pb->pos - delta) % pb->size;
|
||||
|
||||
if (delta < pb->size && pb->packets[i].memblock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue