[farsight2/master] rtpsubstream: Remove another double-unlock in error case
Olivier Crête
olivier.crete at collabora.co.uk
Thu Sep 3 11:22:00 PDT 2009
---
gst/fsrtpconference/fs-rtp-substream.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index b616240..40e0ce5 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -900,8 +900,7 @@ fs_rtp_sub_stream_set_codecbin_unlock (FsRtpSubStream *substream,
if (substream->priv->codecbin)
{
FsCodec *saved_codec = substream->codec;
-
- FS_RTP_SESSION_UNLOCK (substream->priv->session);
+ GstElement *old_codecbin;
gst_element_set_locked_state (substream->priv->codecbin, TRUE);
if (gst_element_set_state (substream->priv->codecbin, GST_STATE_NULL) !=
@@ -922,9 +921,11 @@ fs_rtp_sub_stream_set_codecbin_unlock (FsRtpSubStream *substream,
return FALSE;
}
- gst_bin_remove (GST_BIN (substream->priv->conference),
- substream->priv->codecbin);
+ old_codecbin = substream->priv->codecbin;
substream->priv->codecbin = NULL;
+ FS_RTP_SESSION_UNLOCK (substream->priv->session);
+
+ gst_bin_remove (GST_BIN (substream->priv->conference), old_codecbin);
FS_RTP_SESSION_LOCK (substream->priv->session);
if (substream->codec == saved_codec)
--
1.5.6.5
More information about the farsight-commits
mailing list