summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-04-17 16:16:29 +0200
committerDave Robillard <dave@drobilla.net>2009-05-03 12:03:15 -0400
commit2f09b2584183ca5c6b8f778dd1ca7f9998352dad (patch)
tree7605fb85250a98e207b7529fb2a9a8c3770d258c /gst
parent7713a671d9f9562df6a88936a77c7ba5cbde779a (diff)
downloadgst-plugins-bad-2f09b2584183ca5c6b8f778dd1ca7f9998352dad.tar.gz
gst-plugins-bad-2f09b2584183ca5c6b8f778dd1ca7f9998352dad.tar.bz2
gst-plugins-bad-2f09b2584183ca5c6b8f778dd1ca7f9998352dad.zip
rtpsession: join the RTCP thread
Avoid a case where a joinable thread would be left unjoined, which leaked the thread structure. Fixes #577318.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/gstrtpsession.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index e2a6927f..035d82a8 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -967,6 +967,11 @@ start_rtcp_thread (GstRtpSession * rtpsession)
GST_RTP_SESSION_LOCK (rtpsession);
rtpsession->priv->stop_thread = FALSE;
if (rtpsession->priv->thread_stopped) {
+ /* if the thread stopped, and we still have a handle to the thread, join it
+ * now. We can safely join with the lock held, the thread will not take it
+ * anymore. */
+ if (rtpsession->priv->thread)
+ g_thread_join (rtpsession->priv->thread);
/* only create a new thread if the old one was stopped. Otherwise we can
* just reuse the currently running one. */
rtpsession->priv->thread =