From f32cbe5017430884f7caf7b90abc805c5b71acaf Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Thu, 8 May 2008 09:43:33 +0000 Subject: gst/rtpmanager/rtpsession.c: Unlock the session lock when calling one of our callbacks. Original commit message from CVS: Patch by: Olivier Crete * gst/rtpmanager/rtpsession.c: (source_clock_rate), (rtp_session_process_bye), (rtp_session_send_bye_locked): Unlock the session lock when calling one of our callbacks. Fixes #532011. --- ChangeLog | 9 +++++++++ gst/rtpmanager/rtpsession.c | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4dccd1f8..d8aba844 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-05-08 Wim Taymans + + Patch by: Olivier Crete + + * gst/rtpmanager/rtpsession.c: (source_clock_rate), + (rtp_session_process_bye), (rtp_session_send_bye_locked): + Unlock the session lock when calling one of our callbacks. + Fixes #532011. + 2008-05-08 Sebastian Dröge Patch by: Sjoerd Simons diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 7ddcfe4d..b6ca39cf 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -844,6 +844,8 @@ source_clock_rate (RTPSource * source, guint8 pt, RTPSession * session) { gint result; + RTP_SESSION_UNLOCK (session); + if (session->callbacks.clock_rate) result = session->callbacks.clock_rate (session, pt, @@ -851,6 +853,8 @@ source_clock_rate (RTPSource * source, guint8 pt, RTPSession * session) else result = -1; + RTP_SESSION_LOCK (session); + GST_DEBUG ("got clock-rate %d for pt %d", result, pt); return result; @@ -1608,9 +1612,11 @@ rtp_session_process_bye (RTPSession * sess, GstRTCPPacket * packet, sess->next_rtcp_check_time += arrival->time; + RTP_SESSION_UNLOCK (sess); /* notify app of reconsideration */ if (sess->callbacks.reconsider) sess->callbacks.reconsider (sess, sess->reconsider_user_data); + RTP_SESSION_LOCK (sess); } } @@ -1866,9 +1872,11 @@ rtp_session_send_bye_locked (RTPSession * sess, const gchar * reason) GST_DEBUG ("Schedule BYE for %" GST_TIME_FORMAT ", %" GST_TIME_FORMAT, GST_TIME_ARGS (interval), GST_TIME_ARGS (sess->next_rtcp_check_time)); + RTP_SESSION_UNLOCK (sess); /* notify app of reconsideration */ if (sess->callbacks.reconsider) sess->callbacks.reconsider (sess, sess->reconsider_user_data); + RTP_SESSION_LOCK (sess); done: return result; -- cgit v1.2.1