summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-04-29 18:09:07 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-04-29 18:09:07 +0200
commitde0a2575fc277cbe18979f18c58a799376f21e49 (patch)
treee64d7aeb2f7c0febdd1bf79d5c39befbcdfcb430
parent6cfa856381a1aefe55f25274ec720da21e3e0f29 (diff)
rtspsrc: release state lock before stopping task
We need to release the state lock before trying to wait for the task to end because the task might also take the lock. Fixes #577671
-rw-r--r--gst/rtsp/gstrtspsrc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index f575c65b6..823b86d3f 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -4674,6 +4674,9 @@ gst_rtspsrc_close (GstRTSPSrc * src)
/* stop task if any */
if (src->task) {
+ /* release lock before trying to get the streamlock */
+ GST_RTSP_STATE_UNLOCK (src);
+
gst_task_stop (src->task);
/* make sure it is not running */
@@ -4686,6 +4689,8 @@ gst_rtspsrc_close (GstRTSPSrc * src)
/* and free the task */
gst_object_unref (GST_OBJECT (src->task));
src->task = NULL;
+
+ GST_RTSP_STATE_LOCK (src);
}
if (!src->connection)