[farsight2/master] rtpsubstream: Keep ref on substream while callbacks are invoked

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 22 10:06:30 PST 2009


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

diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index b8ba771..d2a6814 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -168,6 +168,7 @@ fs_rtp_sub_stream_emit_error (FsRtpSubStream *substream,
 static gboolean
 fs_rtp_sub_stream_has_stopped_enter (FsRtpSubStream *self)
 {
+  g_object_ref (self);
   g_static_rw_lock_reader_lock (&self->priv->stopped_lock);
 
   if (self->priv->stopped)
@@ -184,6 +185,7 @@ static void
 fs_rtp_sub_stream_has_stopped_exit (FsRtpSubStream *self)
 {
   g_static_rw_lock_reader_unlock (&self->priv->stopped_lock);
+  g_object_unref (self);
 }
 
 
-- 
1.5.6.5




More information about the farsight-commits mailing list