[farsight2/master] Check session existence on new ssrc-cname-association
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:21 PST 2008
---
gst/fsrtpconference/fs-rtp-conference.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 04d6017..2211779 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -286,8 +286,15 @@ _rtpbin_on_new_ssrc_cname_association (GstElement *rtpbin,
FsRtpConference *self = FS_RTP_CONFERENCE (user_data);
FsRtpSession *session =
fs_rtp_conference_get_session_by_id (self, session_id);
- fs_rtp_session_associate_ssrc_cname (session, ssrc, cname);
- g_object_unref (session);
+
+ if (session) {
+ fs_rtp_session_associate_ssrc_cname (session, ssrc, cname);
+ g_object_unref (session);
+ } else {
+ GST_WARNING_OBJECT(self,"GstRtpBin %p announced a new association"
+ "for non-existent session %u",
+ rtpbin, session_id);
+ }
}
--
1.5.6.5
More information about the farsight-commits
mailing list