[farsight2/master] Don't hold locks during disposes
Olivier Crête
olivier.crete at collabora.co.uk
Fri Dec 12 18:11:38 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 5 -----
gst/fsrtpconference/fs-rtp-stream.c | 2 --
gst/fsrtpconference/fs-rtp-substream.c | 2 ++
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index c43e543..2681dc5 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -435,11 +435,8 @@ fs_rtp_session_dispose (GObject *object)
GList *item = NULL;
GstBin *conferencebin = NULL;
- FS_RTP_SESSION_LOCK (self);
-
if (self->priv->disposed)
{
- FS_RTP_SESSION_UNLOCK (self);
/* If dispose did already run, return. */
return;
}
@@ -650,8 +647,6 @@ fs_rtp_session_dispose (GObject *object)
/* MAKE sure dispose does not run twice. */
self->priv->disposed = TRUE;
- FS_RTP_SESSION_UNLOCK (self);
-
parent_class->dispose (object);
}
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index eb359b1..7906481 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -221,7 +221,6 @@ fs_rtp_stream_dispose (GObject *object)
self->priv->stream_transmitter = NULL;
}
- FS_RTP_SESSION_LOCK (self->priv->session);
if (self->priv->recv_codecs_changed_idle_id)
{
g_source_remove (self->priv->recv_codecs_changed_idle_id);
@@ -233,7 +232,6 @@ fs_rtp_stream_dispose (GObject *object)
g_list_free (self->substreams);
self->substreams = NULL;
}
- FS_RTP_SESSION_UNLOCK (self->priv->session);
if (self->participant) {
g_object_unref (self->participant);
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index 7fea3ae..d668ddd 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -1052,7 +1052,9 @@ fs_rtp_sub_stream_add_output_ghostpad_locked (FsRtpSubStream *substream,
g_signal_emit (substream, signals[SRC_PAD_ADDED], 0,
ghostpad, substream->priv->codec);
+ FS_RTP_SESSION_UNLOCK (substream->priv->session);
g_signal_emit (substream, signals[CODEC_CHANGED], 0);
+ FS_RTP_SESSION_LOCK (substream->priv->session);
if (substream->priv->receiving)
g_object_set (substream->priv->valve, "drop", FALSE, NULL);
--
1.5.6.5
More information about the farsight-commits
mailing list