mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
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
This commit is contained in:
parent
640de61740
commit
c3077012c0
1 changed files with 3 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue