jiterbuffer: Move assertion to the right location
authorEdward Hervey <edward@centricular.com>
Thu, 7 Apr 2016 11:01:52 +0000 (13:01 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 7 Apr 2016 11:01:52 +0000 (13:01 +0200)
We shouldn't have "late" lost timers at that point

gst/rtpmanager/gstrtpjitterbuffer.c

index 608c794..4ccde7a 100644 (file)
@@ -3581,10 +3581,10 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
       GstClockReturn ret;
       GstClockTimeDiff clock_jitter;
 
-      /* We have normally removed all lost timers in the loop above */
-      g_assert (timer->type != TIMER_TYPE_LOST);
-
       if (timer_timeout == -1 || timer_timeout <= now) {
+        /* We have normally removed all lost timers in the loop above */
+        g_assert (timer->type != TIMER_TYPE_LOST);
+
         do_timeout (jitterbuffer, timer, now);
         /* check here, do_timeout could have released the lock */
         if (!priv->timer_running)