rtpjitterbuffer: optimize timer update
authorWim Taymans <wtaymans@redhat.com>
Tue, 29 Apr 2014 14:26:53 +0000 (16:26 +0200)
committerWim Taymans <wtaymans@redhat.com>
Tue, 29 Apr 2014 14:26:53 +0000 (16:26 +0200)
When we are not doing retransmission, we just need to find the current
seqnum so we can stop when we found it.

gst/rtpmanager/gstrtpjitterbuffer.c

index 4b2e729..1459e91 100644 (file)
@@ -1823,6 +1823,10 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum,
       GST_DEBUG ("found timer for current seqnum");
       /* the timer for the current seqnum */
       timer = test;
+      /* when no retransmission, we can stop now, we only need to find the
+       * timer for the current seqnum */
+      if (!priv->do_retransmission)
+        break;
     } else if (gap > priv->rtx_delay_reorder) {
       /* max gap, we exceeded the max reorder distance and we don't expect the
        * missing packet to be this reordered */