From 6f4deab298f18efd2ec0c6a8b5da4a8c819c4c56 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 20 Sep 2013 12:25:43 +0200 Subject: [PATCH] rtpjitterbuffer: stop the timer thread 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index f9506f3..8e02327 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -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) { -- 2.7.4