mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
jitterbuffer: reset retransmission timers in add/reschedule
Reset the retransmission timers when adding and rescheduling a timer.
This commit is contained in:
parent
cf8a0652f3
commit
b4a35bbe82
1 changed files with 10 additions and 6 deletions
|
@ -1475,7 +1475,10 @@ add_timer (GstRtpJitterBuffer * jitterbuffer, TimerType type,
|
||||||
timer->type = type;
|
timer->type = type;
|
||||||
timer->seqnum = seqnum;
|
timer->seqnum = seqnum;
|
||||||
timer->timeout = timeout;
|
timer->timeout = timeout;
|
||||||
|
if (type == TIMER_TYPE_EXPECTED) {
|
||||||
|
timer->rtx_base = timeout;
|
||||||
|
timer->rtx_retry = 0;
|
||||||
|
}
|
||||||
recalculate_timer (jitterbuffer, timer);
|
recalculate_timer (jitterbuffer, timer);
|
||||||
|
|
||||||
return timer;
|
return timer;
|
||||||
|
@ -1503,6 +1506,10 @@ reschedule_timer (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
|
||||||
|
|
||||||
timer->timeout = timeout;
|
timer->timeout = timeout;
|
||||||
timer->seqnum = seqnum;
|
timer->seqnum = seqnum;
|
||||||
|
if (seqchange && timer->type == TIMER_TYPE_EXPECTED) {
|
||||||
|
timer->rtx_base = timeout;
|
||||||
|
timer->rtx_retry = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->clock_id) {
|
if (priv->clock_id) {
|
||||||
/* we changed the seqnum and there is a timer currently waiting with this
|
/* we changed the seqnum and there is a timer currently waiting with this
|
||||||
|
@ -1619,11 +1626,8 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum,
|
||||||
if (timer)
|
if (timer)
|
||||||
reschedule_timer (jitterbuffer, timer, priv->next_in_seqnum, expected);
|
reschedule_timer (jitterbuffer, timer, priv->next_in_seqnum, expected);
|
||||||
else
|
else
|
||||||
timer = add_timer (jitterbuffer, TIMER_TYPE_EXPECTED,
|
add_timer (jitterbuffer, TIMER_TYPE_EXPECTED, priv->next_in_seqnum,
|
||||||
priv->next_in_seqnum, expected);
|
expected);
|
||||||
|
|
||||||
timer->rtx_base = timer->timeout;
|
|
||||||
timer->rtx_retry = 0;
|
|
||||||
} else if (timer) {
|
} else if (timer) {
|
||||||
/* if we had a timer, remove it, we don't know when to expect the next
|
/* if we had a timer, remove it, we don't know when to expect the next
|
||||||
* packet. */
|
* packet. */
|
||||||
|
|
Loading…
Reference in a new issue