From c4dc159656c4dc7eba0bca8e54ffa0cf92fdb32b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 19 Aug 2013 21:34:38 +0200 Subject: [PATCH] jitterbuffer: keep track of last seqnum and dts --- gst/rtpmanager/gstrtpjitterbuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 083c0d1..48e766d 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -167,7 +167,10 @@ struct _GstRtpJitterBufferPrivate GstClockTime ips_dts; guint64 ips_rtptime; GstClockTime packet_spacing; + /* the next expected seqnum we receive */ + GstClockTime last_in_dts; + guint32 last_in_seqnum; guint32 next_in_seqnum; GArray *timers; @@ -1777,8 +1780,11 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, /* unknow first seqnum */ do_next_seqnum = TRUE; } - if (do_next_seqnum) + if (do_next_seqnum) { + priv->last_in_seqnum = seqnum; + priv->last_in_dts = dts; priv->next_in_seqnum = (seqnum + 1) & 0xffff; + } /* let's check if this buffer is too late, we can only accept packets with * bigger seqnum than the one we last pushed. */ -- 2.7.4