diff options
author | Stian Selnes <stian@pexip.com> | 2016-07-26 18:01:48 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2016-09-14 19:37:50 -0400 |
commit | ab49dfd0b209a5dec10ce9cc8b84ae86dc1e8779 (patch) | |
tree | d75804ea82bac684b7be1dda2e6c76c6281b9519 /gst/rtpmanager | |
parent | dd020f5cc8021bffb10b4e7835850600090a2540 (diff) | |
download | gstreamer-plugins-good-ab49dfd0b209a5dec10ce9cc8b84ae86dc1e8779.tar.gz |
rtpjitterbuffer: Fix lost duration when gap after lost timer
This patch fixes an issue with the estimated gap duration when there is
a gap immediately after a lost timer has been processed. Previously
there was a discrepancy beteen the gap in seqnum and gap in dts which
would cause wrong calculated duration. The issue would only be seen with
retranmission enabled since when it's disabled lost timers are only
created when a packet is received and the actual gap length and last dts
is known.
https://bugzilla.gnome.org/show_bug.cgi?id=769768
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r-- | gst/rtpmanager/gstrtpjitterbuffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 931153056..c3ab683f5 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -3678,8 +3678,10 @@ do_lost_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer, next_in_seqnum = (seqnum + lost_packets) & 0xffff; /* we now only accept seqnum bigger than this */ - if (gst_rtp_buffer_compare_seqnum (priv->next_in_seqnum, next_in_seqnum) > 0) + if (gst_rtp_buffer_compare_seqnum (priv->next_in_seqnum, next_in_seqnum) > 0) { priv->next_in_seqnum = next_in_seqnum; + priv->last_in_dts = apply_offset (jitterbuffer, timer->timeout); + } /* Avoid creating events if we don't need it. Note that we still need to create * the lost *ITEM* since it will be used to notify the outgoing thread of |