Commit d8c32a08 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: ignore packets with duplicated sequence numbers (closes #2003)

parent 6946f7ac
......@@ -306,8 +306,11 @@ rtp_receive (demux_t *demux, rtp_session_t *session, block_t *block)
block_t **pp = &src->blocks;
for (block_t *prev = *pp; prev != NULL; prev = *pp)
{
if ((int16_t)(seq - rtp_seq (*pp)) < 0)
int16_t delta_seq = seq - rtp_seq (prev);
if (delta_seq < 0)
break;
if (delta_seq == 0)
goto drop; /* duplicate */
pp = &prev->p_next;
}
block->p_next = *pp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment