rtpjitterbuffer: ignore invalid timestamps in rtt calculation
authorWim Taymans <wtaymans@redhat.com>
Tue, 21 Jan 2014 14:24:52 +0000 (15:24 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 21 Jan 2014 14:29:26 +0000 (15:29 +0100)
When the input buffer does not have a valid timestamp, don't try to
calculate the round-trip-time.

gst/rtpmanager/gstrtpjitterbuffer.c

index 4b61bb3..dd54064 100644 (file)
@@ -1841,7 +1841,7 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum,
       /* calculate the delay between retransmission request and receiving this
        * packet, start with when we scheduled this timeout last */
       rtx_last = timer->rtx_last;
-      if (dts > rtx_last) {
+      if (dts != GST_CLOCK_TIME_NONE && dts > rtx_last) {
         /* we have a valid delay if this packet arrived after we scheduled the
          * request */
         delay = dts - rtx_last;