gst-libs/gst/rtp/gstbasertpdepayload.*: Handle RTP sequence number rollover.
authorMarcel Moreaux <marcelm@luon.net>
Wed, 2 Aug 2006 17:03:29 +0000 (17:03 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 2 Aug 2006 17:03:29 +0000 (17:03 +0000)
Original commit message from CVS:
Patch by: Marcel Moreaux <marcelm at luon dot net>
* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_add_to_queue):
* gst-libs/gst/rtp/gstbasertpdepayload.h:
Handle RTP sequence number rollover.
Disable jitterbuffer by default.

ChangeLog
gst-libs/gst/rtp/gstbasertpdepayload.c
gst-libs/gst/rtp/gstbasertpdepayload.h

index c49f367..47e3f10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-08-02  Wim Taymans  <wim@fluendo.com>
+
+       Patch by: Marcel Moreaux <marcelm at luon dot net>
+
+       * gst-libs/gst/rtp/gstbasertpdepayload.c:
+       (gst_base_rtp_depayload_add_to_queue):
+       * gst-libs/gst/rtp/gstbasertpdepayload.h:
+       Handle RTP sequence number rollover.
+       Disable jitterbuffer by default.
+
 2006-07-28  Jan Schmidt  <thaytan@mad.scientist.com>
 
        * gst/audioresample/gstaudioresample.c: (audioresample_stop),
index df13a52..abb7e11 100644 (file)
@@ -300,7 +300,10 @@ gst_base_rtp_depayload_add_to_queue (GstBaseRTPDepayload * filter,
     /* look for right place to insert it */
     i = 0;
 
-    while (seqnum > queueseq) {
+    /* Check for seqnum wraparound.
+     * Seqnums in the lowest quadrant of the 0-65535 space are considered to
+     * be greater than seqnums in the highest quadrant of this space. */
+    while (seqnum > queueseq || (seqnum < 16384 && queueseq > 49150)) {
       gpointer data;
 
       i++;
index f28aaaa..15d7c50 100644 (file)
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
 #define GST_BASE_RTP_DEPAYLOAD_SRCPAD(depayload)  (GST_BASE_RTP_DEPAYLOAD (depayload)->srcpad)
 
 /* in milliseconds */
-#define RTP_QUEUE_DELAY 100;
+#define RTP_QUEUE_DELAY 0;
 
 #define QUEUE_LOCK_INIT(base)   (g_static_rec_mutex_init(&base->queuelock))
 #define QUEUE_LOCK_FREE(base)   (g_static_rec_mutex_free(&base->queuelock))