[farsight2/master] rtp: Keep session ref while doing callback

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


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

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 4c8497c..970e01f 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -3674,8 +3674,13 @@ _substream_blocked (FsRtpSubStream *substream, FsRtpStream *stream,
   guint32 ssrc;
   guint pt;
 
+  g_object_ref (session);
+
   if (fs_rtp_session_has_disposed_enter (session, NULL))
+  {
+    g_object_unref (session);
     return;
+  }
 
   FS_RTP_SESSION_LOCK (session);
 
@@ -3702,6 +3707,7 @@ _substream_blocked (FsRtpSubStream *substream, FsRtpStream *stream,
 
   g_clear_error (&error);
   fs_rtp_session_has_disposed_exit (session);
+  g_object_unref (session);
 }
 
 static void
-- 
1.5.6.5




More information about the farsight-commits mailing list