[farsight2/master] Simplify locking a little

Olivier Crête olivier.crete at collabora.co.uk
Mon Dec 22 18:14:46 PST 2008


---
 gst/fsrtpconference/fs-rtp-session.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 7961a5e..c48580c 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2337,10 +2337,10 @@ fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad,
 
   g_clear_error (&error);
 
-  FS_RTP_SESSION_LOCK (session);
 
   if (stream)
   {
+    FS_RTP_SESSION_LOCK (session);
     if (!fs_rtp_stream_add_substream_unlock (stream, substream, &error))
       fs_session_emit_error (FS_SESSION (session), error->code,
           "Could not add the output ghostpad to the new substream",
@@ -2348,10 +2348,6 @@ fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad,
 
     g_clear_error (&error);
   }
-  else
-  {
-    FS_RTP_SESSION_UNLOCK (session);
-  }
 
   if (stream)
     g_object_unref (stream);
-- 
1.5.6.5




More information about the farsight-commits mailing list