diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-01-27 16:37:57 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-01-27 16:37:57 -0500 |
commit | 7f02aac24c859aadf4a0a83991502c9bcc1ddaf8 (patch) | |
tree | 9edc7d8c06463f330111d5812ab984f31a817e3d /gst | |
parent | 6b5e40c6c1f62ae1a1099f56ae70ed26b23c8a88 (diff) | |
download | farstream-7f02aac24c859aadf4a0a83991502c9bcc1ddaf8.tar.gz |
msnconnection: Fix potential race/deadlock
Unlock the mutex while waiting for the thread to exit.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/fsmsnconference/fs-msn-connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/fsmsnconference/fs-msn-connection.c b/gst/fsmsnconference/fs-msn-connection.c index d381d27d..0acf8c33 100644 --- a/gst/fsmsnconference/fs-msn-connection.c +++ b/gst/fsmsnconference/fs-msn-connection.c @@ -207,8 +207,12 @@ fs_msn_connection_dispose (GObject *object) if (self->polling_thread) { + GThread *polling_thread = g_thread_ref (self->polling_thread); gst_poll_set_flushing (self->poll, TRUE); - g_thread_join (self->polling_thread); + FS_MSN_CONNECTION_UNLOCK(self); + g_thread_join (polling_thread); + FS_MSN_CONNECTION_LOCK(self); + g_thread_unref (polling_thread); self->polling_thread = NULL; } |