summaryrefslogtreecommitdiff
path: root/gst/rtpmanager/rtpjitterbuffer.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 17:15:11 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 17:15:11 +0100
commitc3077012c0914a8d3a103a858d820f4a3ec3c900 (patch)
tree2e243255e8bf3506192f13477c46e70c892544cd /gst/rtpmanager/rtpjitterbuffer.c
parent640de61740e86521581671ed6e2993dd0a44dbe7 (diff)
jitterbuffer: do skew estimation only for new timestamps
Only run the skew estimation code when we have a new RTP timestamp. If we have the same RTP timestamp, we simply use the previous estimation. This works because the new observation with the same RTP timestamp has to have a bigger receiver time and is thus not going to influence the estimation except for causing more jitter. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=640023
Diffstat (limited to 'gst/rtpmanager/rtpjitterbuffer.c')
-rw-r--r--gst/rtpmanager/rtpjitterbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpjitterbuffer.c b/gst/rtpmanager/rtpjitterbuffer.c
index a6bcd9982..f3e85e1d8 100644
--- a/gst/rtpmanager/rtpjitterbuffer.c
+++ b/gst/rtpmanager/rtpjitterbuffer.c
@@ -373,6 +373,9 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time,
ext_rtptime = gst_rtp_buffer_ext_timestamp (&jbuf->ext_rtptime, rtptime);
+ if (jbuf->last_rtptime != -1 && ext_rtptime == jbuf->last_rtptime)
+ return jbuf->prev_out_time;
+
gstrtptime = gst_util_uint64_scale_int (ext_rtptime, GST_SECOND, clock_rate);
/* keep track of the last extended rtptime */