rtpjitter: Account for rtx_retry in overflow check
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 20 Mar 2015 17:03:09 +0000 (13:03 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 25 Mar 2015 19:25:56 +0000 (15:25 -0400)
As rtx_retry is part of the substraction, we need to take it into
account, otherwise we may endup with a big value.

gst/rtpmanager/gstrtpjitterbuffer.c

index 999b24c..c095920 100644 (file)
@@ -2063,7 +2063,7 @@ calculate_expected (GstRtpJitterBuffer * jitterbuffer, guint32 expected,
       GstClockTime timeout = timer->timeout;
 
       timer->duration = duration;
-      if (timeout > expected_dts) {
+      if (timeout > (expected_dts + timer->rtx_retry)) {
         GstClockTime delay = timeout - expected_dts - timer->rtx_retry;
         reschedule_timer (jitterbuffer, timer, timer->seqnum, expected_dts,
             delay, TRUE);