rtpjitterbuffer: Fix calculating next_seqnum when dropping old buffers from a full...
authorThomas Bluemel <tbluemel@control4.com>
Thu, 11 Aug 2016 17:04:22 +0000 (11:04 -0600)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Wed, 14 Sep 2016 23:47:28 +0000 (19:47 -0400)
Fixes calculating the next sequence number when a ITEM_TYPE_LOST with more than one
definitely lost packets is encountered.

https://bugzilla.gnome.org/show_bug.cgi?id=769757

gst/rtpmanager/gstrtpjitterbuffer.c

index 1a71947..e1c315c 100644 (file)
@@ -3052,7 +3052,7 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
         old_item = rtp_jitter_buffer_pop (priv->jbuf, &percent);
         GST_DEBUG_OBJECT (jitterbuffer, "Queue full, dropping old packet %p",
             old_item);
-        priv->next_seqnum = (old_item->seqnum + 1) & 0xffff;
+        priv->next_seqnum = (old_item->seqnum + old_item->count) & 0xffff;
         free_item (old_item);
       }
       /* we might have removed some head buffers, signal the pushing thread to