[farsight2/master] nice: Release lock before calling into nice agent

Olivier Crête olivier.crete at collabora.co.uk
Thu Jun 25 14:35:29 PDT 2009


---
 transmitters/nice/fs-nice-stream-transmitter.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index 070229f..3d21623 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -408,18 +408,21 @@ fs_nice_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter)
 {
   FsNiceStreamTransmitter *self =
     FS_NICE_STREAM_TRANSMITTER (streamtransmitter);
+  NiceGstStream *gststream;
+  guint stream_id;
+
 
   FS_NICE_STREAM_TRANSMITTER_LOCK (self);
-  if (self->priv->gststream)
-    fs_nice_transmitter_free_gst_stream (self->priv->transmitter,
-        self->priv->gststream);
+  gststream = self->priv->gststream;
   self->priv->gststream = NULL;
-
-  if (self->priv->stream_id)
-    nice_agent_remove_stream (self->priv->agent->agent,
-        self->priv->stream_id);
+  stream_id = self->priv->stream_id;
   self->priv->stream_id = 0;
   FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
+
+  if (gststream)
+    fs_nice_transmitter_free_gst_stream (self->priv->transmitter, gststream);
+  if (stream_id)
+    nice_agent_remove_stream (self->priv->agent->agent, stream_id);
 }
 
 
-- 
1.5.6.5



More information about the farsight-commits mailing list