rtpjitterbuffer: Compare ext RTP times, not plain RTP time and ext RTP time when...
authorSebastian Dröge <sebastian@centricular.com>
Tue, 16 Jun 2015 08:30:34 +0000 (10:30 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 16 Jun 2015 08:31:47 +0000 (10:31 +0200)
Otherwise all RTP times after a wraparound would be considered as going
backwards, they will always be smaller than the ext RTP time.

gst/rtpmanager/gstrtpjitterbuffer.c

index 89b1072..4e29e42 100644 (file)
@@ -2717,10 +2717,9 @@ compute_elapsed (GstRtpJitterBuffer * jitterbuffer, RTPJitterBufferItem * item)
   GST_LOG_OBJECT (jitterbuffer, "rtp %" G_GUINT32_FORMAT ", ext %"
       G_GUINT64_FORMAT, rtp_time, priv->ext_timestamp);
 
-  if (rtp_time < priv->ext_timestamp) {
+  ext_time = gst_rtp_buffer_ext_timestamp (&priv->ext_timestamp, rtp_time);
+  if (ext_time < priv->ext_timestamp) {
     ext_time = priv->ext_timestamp;
-  } else {
-    ext_time = gst_rtp_buffer_ext_timestamp (&priv->ext_timestamp, rtp_time);
   }
 
   if (ext_time > priv->clock_base)