mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
jitterbuffer: remove lost timer when we get the packet
When we receive a packet, also remove the LOST timer for it.
This commit is contained in:
parent
2f03b43b21
commit
ec82e4ab7c
1 changed files with 10 additions and 3 deletions
|
@ -1584,14 +1584,21 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum,
|
|||
TimerData *test = &g_array_index (priv->timers, TimerData, i);
|
||||
gint gap;
|
||||
|
||||
if (test->type != TIMER_TYPE_EXPECTED)
|
||||
continue;
|
||||
|
||||
gap = gst_rtp_buffer_compare_seqnum (test->seqnum, seqnum);
|
||||
|
||||
GST_DEBUG_OBJECT (jitterbuffer, "%d, #%d<->#%d gap %d", i,
|
||||
test->seqnum, seqnum, gap);
|
||||
|
||||
if (test->type == TIMER_TYPE_LOST) {
|
||||
if (gap == 0) {
|
||||
remove_timer (jitterbuffer, test);
|
||||
len--;
|
||||
i--;
|
||||
}
|
||||
continue;
|
||||
} else if (test->type != TIMER_TYPE_EXPECTED)
|
||||
continue;
|
||||
|
||||
if (gap == 0) {
|
||||
/* the timer for the current seqnum */
|
||||
timer = test;
|
||||
|
|
Loading…
Reference in a new issue