summaryrefslogtreecommitdiff
path: root/res/res_pjsip_session.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-07-17 16:01:24 +0000
committerGeorge Joseph <gjoseph@digium.com>2017-07-26 06:00:56 -0500
commit451d86d62e440545e6ab2026ce142d3130b5ac5f (patch)
tree1853353f7cf7fd889c1b337038b25a4f1fad6b01 /res/res_pjsip_session.c
parent29a746c534799d203ccbd3396cea744e136613c7 (diff)
bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation issues.
This change does a few things to improve packet loss and renegotiation: 1. On outgoing RTP streams we will now properly reflect out of order packets and packet loss in the sequence number. This allows the remote jitterbuffer to better reorder things. 2. Video updates can now be discarded for a period of time after one has been sent to prevent flooding of clients. 3. For declined and removed streams we will now release any media session resources associated with them. This was not previously done and caused an issue where old state was being used for a new stream. 4. RTP bundling was not actually removing bundled RTP instances from the parent. This has been resolved by removing based on the RTP instance itself and not the SSRC. 5. The code did not properly handle explicitly unbundling an RTP instance from its parent. This now works as expected. ASTERISK-27143 Change-Id: Ibd91362f0e4990b6129638e712bc8adf0899fd45
Diffstat (limited to 'res/res_pjsip_session.c')
-rw-r--r--res/res_pjsip_session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index fe3680f3b..0ad2c8f30 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -785,6 +785,12 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_
* we remove it as a result of the stream limit being reached.
*/
if (ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
+ /* This stream is no longer being used so release any resources the handler
+ * may have on it.
+ */
+ if (session_media->handler) {
+ session_media_set_handler(session_media, NULL);
+ }
continue;
}