rtpjitterbuffer: stop the timer thread
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 20 Sep 2013 10:25:43 +0000 (12:25 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 23 Sep 2013 12:45:24 +0000 (14:45 +0200)
The timeout code could release the lock so we need to check if we are allowed to
wait for the clock some more.

gst/rtpmanager/gstrtpjitterbuffer.c

index f9506f3..8e02327 100644 (file)
@@ -2473,6 +2473,10 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
       GstClockReturn ret;
       GstClockTimeDiff clock_jitter;
 
+      /* check here, do_timeout could have released the lock */
+      if (!priv->timer_running)
+        break;
+
       GST_OBJECT_LOCK (jitterbuffer);
       clock = GST_ELEMENT_CLOCK (jitterbuffer);
       if (!clock) {