aboutsummaryrefslogtreecommitdiffstats
path: root/src/trau/osmo_ortp.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-05-30 11:00:21 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-05-30 14:31:34 +0200
commitc81b68f3e83bc95c71b3078838b2f70abe39927f (patch)
tree46e5dc7dc1df696ecd8f59156e8346f5c578effb /src/trau/osmo_ortp.c
parent28eeb6bc9365bbe47125775fcb1f696317c22466 (diff)
ortp: detect ssrc changes immediately
libortp detects an ssrc jump using a packet count thresold. This threshold is set to 50 by default. This means that libortp has to see 50 rtp packets with the new SSRC before it accepts the new stream. In our application we want to detect the changed SSRC (Handover) as fast as possible. So we should change the threshold to zero. - use rtp_session_set_ssrc_changed_threshold() to set a thresold of 0 packets when osmo_rtp_socket_create() is called. Change-Id: Id88c2c44d29a409affc2e47fdb932e1187020593 Related: OS#3299
Diffstat (limited to 'src/trau/osmo_ortp.c')
-rw-r--r--src/trau/osmo_ortp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index 9062289..bf8df6a 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -372,6 +372,8 @@ struct osmo_rtp_socket *osmo_rtp_socket_create(void *talloc_ctx, unsigned int fl
rtp_session_set_seq_number(rs->sess, random());
rs->tx_timestamp = random();
+ /* Make sure ssrc changes are detected immediately */
+ rtp_session_set_ssrc_changed_threshold(rs->sess, 0);
return rs;
}