From f6b6797874d857cf8ab6b2fe9429ab0ff4533856 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 2 Aug 2013 06:28:32 +0200 Subject: [PATCH] jitterbuffer: small cleanup --- gst/rtpmanager/gstrtpjitterbuffer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index f8d85c4..57a989e 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -1400,9 +1400,6 @@ remove_timer (GstRtpJitterBuffer * jitterbuffer, TimerData * timer) GstRtpJitterBufferPrivate *priv = jitterbuffer->priv; guint idx; - if (timer == NULL) - return; - if (priv->clock_id && priv->timer_seqnum == timer->seqnum) unschedule_current_timer (jitterbuffer); @@ -1475,7 +1472,9 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum, else timer = add_timer (jitterbuffer, TIMER_TYPE_EXPECTED, priv->next_in_seqnum, expected); - } else { + } else if (timer) { + /* if we had a timer, remove it, we don't know when to expect the next + * packet. */ remove_timer (jitterbuffer, timer); } } -- 2.7.4