[farsight2/master] Use the proper locking wen accessing the codec bin in the substream

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:20:01 PST 2008


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

diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index 80a5556..599b39c 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -488,8 +488,10 @@ fs_rtp_sub_stream_stop (FsRtpSubStream *substream)
   if (substream->priv->valve)
     gst_element_set_state (substream->priv->valve, GST_STATE_NULL);
 
+  FS_RTP_SUB_STREAM_LOCK (substream);
   if (substream->priv->codecbin)
     gst_element_set_state (substream->priv->codecbin, GST_STATE_NULL);
+  FS_RTP_SUB_STREAM_UNLOCK (substream);
 }
 
 
@@ -517,8 +519,11 @@ fs_rtp_sub_stream_get_output_ghostpad (FsRtpSubStream *substream,
 
   padname = g_strdup_printf ("src_%d_%d_%d", session_id, substream->priv->ssrc,
       substream->priv->pt);
+
+  FS_RTP_SUB_STREAM_LOCK (substream);
   codecbin_srcpad = gst_element_get_static_pad (substream->priv->codecbin,
       "src");
+  FS_RTP_SUB_STREAM_UNLOCK (substream);
   g_assert (codecbin_srcpad);
 
   ghostpad = gst_ghost_pad_new_from_template (padname, codecbin_srcpad,
-- 
1.5.6.5




More information about the farsight-commits mailing list