jitterbuffer: update timers after queueing
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 2 Aug 2013 10:43:00 +0000 (12:43 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 2 Aug 2013 10:43:00 +0000 (12:43 +0200)
Else we might update the timer needlessly for duplicates.

gst/rtpmanager/gstrtpjitterbuffer.c

index 899a0ec..47ae349 100644 (file)
@@ -1643,9 +1643,6 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
       goto too_late;
   }
 
-  /* update timers */
-  update_timers (jitterbuffer, seqnum, dts);
-
   /* let's drop oldest packet if the queue is already full and drop-on-latency
    * is set. We can only do this when there actually is a latency. When no
    * latency is set, we just pump it in the queue and let the other end push it
@@ -1679,6 +1676,9 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
               priv->clock_rate, &tail, &percent)))
     goto duplicate;
 
+  /* update timers */
+  update_timers (jitterbuffer, seqnum, dts);
+
   /* we had an unhandled SR, handle it now */
   if (priv->last_sr)
     do_handle_sync (jitterbuffer);