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

RTP: dequeue and discard late packets

parent 2680e77e
...@@ -479,13 +479,12 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session, ...@@ -479,13 +479,12 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
*/ */
while (((block = src->blocks)) != NULL) while (((block = src->blocks)) != NULL)
{ {
#if 0 if ((int16_t)(rtp_seq (block) - (src->last_seq + 1)) <= 0)
if (rtp_seq (block) == ((src->last_seq + 1) & 0xffff)) { /* Next (or earlier) block ready, no need to wait */
{ /* Next block ready, no need to wait */
rtp_decode (demux, session, src); rtp_decode (demux, session, src);
continue; continue;
} }
#endif
/* Wait for 3 times the inter-arrival delay variance (about 99.7% /* Wait for 3 times the inter-arrival delay variance (about 99.7%
* match for random gaussian jitter). Additionnaly, we implicitly * match for random gaussian jitter). Additionnaly, we implicitly
* wait for misordering times the packetization time. * wait for misordering times the packetization time.
......
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