gst/rtpmanager/rtpsession.c: Ref the rtpsource object before we release the session lock when we emit the signals.

Original commit message from CVS:
* gst/rtpmanager/rtpsession.c: (on_new_ssrc), (on_ssrc_collision),
(on_ssrc_validated), (on_ssrc_active), (on_ssrc_sdes),
(on_bye_ssrc), (on_bye_timeout), (on_timeout), (on_sender_timeout):
Ref the rtpsource object before we release the session lock when we emit
the signals.
This commit is contained in:
Wim Taymans 2008-09-30 15:08:52 +00:00
parent 69fad589ac
commit aaee1a3d42
2 changed files with 26 additions and 0 deletions
ChangeLog
gst/rtpmanager

View file

@ -1,3 +1,11 @@
2008-09-30 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/rtpmanager/rtpsession.c: (on_new_ssrc), (on_ssrc_collision),
(on_ssrc_validated), (on_ssrc_active), (on_ssrc_sdes),
(on_bye_ssrc), (on_bye_timeout), (on_timeout), (on_sender_timeout):
Ref the rtpsource object before we release the session lock when we emit
the signals.
2008-09-30 Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com> 2008-09-30 Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
* sys/Makefile.am: * sys/Makefile.am:

View file

@ -462,77 +462,95 @@ rtp_session_get_property (GObject * object, guint prop_id,
static void static void
on_new_ssrc (RTPSession * sess, RTPSource * source) on_new_ssrc (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_NEW_SSRC], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_NEW_SSRC], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_ssrc_collision (RTPSession * sess, RTPSource * source) on_ssrc_collision (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_COLLISION], 0, g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_COLLISION], 0,
source); source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_ssrc_validated (RTPSession * sess, RTPSource * source) on_ssrc_validated (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_VALIDATED], 0, g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_VALIDATED], 0,
source); source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_ssrc_active (RTPSession * sess, RTPSource * source) on_ssrc_active (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_ACTIVE], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_ACTIVE], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_ssrc_sdes (RTPSession * sess, RTPSource * source) on_ssrc_sdes (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
GST_DEBUG ("SDES changed for SSRC %08x", source->ssrc); GST_DEBUG ("SDES changed for SSRC %08x", source->ssrc);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_SDES], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_SDES], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_bye_ssrc (RTPSession * sess, RTPSource * source) on_bye_ssrc (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_BYE_SSRC], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_BYE_SSRC], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_bye_timeout (RTPSession * sess, RTPSource * source) on_bye_timeout (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_BYE_TIMEOUT], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_BYE_TIMEOUT], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_timeout (RTPSession * sess, RTPSource * source) on_timeout (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_TIMEOUT], 0, source); g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_TIMEOUT], 0, source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
static void static void
on_sender_timeout (RTPSession * sess, RTPSource * source) on_sender_timeout (RTPSession * sess, RTPSource * source)
{ {
g_object_ref (source);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SENDER_TIMEOUT], 0, g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SENDER_TIMEOUT], 0,
source); source);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);
g_object_unref (source);
} }
/** /**