[vlc-devel] commit: RTP: dequeue and discard late packets ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Dec 3 18:29:54 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Dec 3 19:29:38 2008 +0200| [2cd57dde9b3a7b10700a89c479c37da4d71c48b0] | committer: Rémi Denis-Courmont
RTP: dequeue and discard late packets
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cd57dde9b3a7b10700a89c479c37da4d71c48b0
---
modules/access/rtp/session.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c
index e9bf3cb..a4e0d22 100644
--- a/modules/access/rtp/session.c
+++ b/modules/access/rtp/session.c
@@ -479,13 +479,12 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
*/
while (((block = src->blocks)) != NULL)
{
-#if 0
- if (rtp_seq (block) == ((src->last_seq + 1) & 0xffff))
- { /* Next block ready, no need to wait */
+ if ((int16_t)(rtp_seq (block) - (src->last_seq + 1)) <= 0)
+ { /* Next (or earlier) block ready, no need to wait */
rtp_decode (demux, session, src);
continue;
}
-#endif
+
/* Wait for 3 times the inter-arrival delay variance (about 99.7%
* match for random gaussian jitter). Additionnaly, we implicitly
* wait for misordering times the packetization time.
More information about the vlc-devel
mailing list