[farsight2/master] unlock lock before emitting signal

Olivier Crête olivier.crete at collabora.co.uk
Fri Dec 12 18:13:43 PST 2008


---
 gst/fsrtpconference/fs-rtp-stream.c    |    6 ++----
 gst/fsrtpconference/fs-rtp-substream.c |    5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 7906481..c08adf6 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -724,11 +724,9 @@ static void
 _substream_src_pad_added (FsRtpSubStream *substream, GstPad *pad,
                           FsCodec *codec, gpointer user_data)
 {
-  FsRtpStream *self = FS_RTP_STREAM (user_data);
+  FsStream *stream = FS_STREAM (user_data);
 
-  FS_RTP_SESSION_UNLOCK (self->priv->session);
-  fs_stream_emit_src_pad_added (FS_STREAM_CAST (self), pad, codec);
-  FS_RTP_SESSION_LOCK (self->priv->session);
+  fs_stream_emit_src_pad_added (stream, pad, codec);
 }
 
 static void
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index d668ddd..07964fa 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -288,7 +288,7 @@ fs_rtp_sub_stream_class_init (FsRtpSubStreamClass *klass)
    * This signal is not emitted on the main thread, but on GStreamer's streaming
    * thread!
    *
-   * This is probably re-emited by the FsStream
+   * This is re-emited by the FsStream
    *
    */
   signals[SRC_PAD_ADDED] = g_signal_new ("src-pad-added",
@@ -1049,10 +1049,9 @@ fs_rtp_sub_stream_add_output_ghostpad_locked (FsRtpSubStream *substream,
       substream->priv->ssrc, substream->priv->pt,
       FS_CODEC_ARGS (substream->priv->codec));
 
+  FS_RTP_SESSION_UNLOCK (substream->priv->session);
   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);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list