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:
Wim Taymans 2013-08-19 14:58:01 +02:00
parent 2f03b43b21
commit ec82e4ab7c

View file

@ -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;