diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-06-24 11:02:01 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-06-24 11:02:01 +0200 |
commit | fb6e1e993e66899839bc86cfe0bf7542239c8851 (patch) | |
tree | 9ddf3e6476ad7c8cd9b9236ef6e28cbae43bd939 /src/trau | |
parent | bf6f1f4a37c254f5046de555092b8c0b8c0940a6 (diff) |
rtp: Randomize the initial timestamp for RFC compliance
Pick a random timestamp when creating the session.
RFC 3550:
The initial value of the timestamp SHOULD be random, as for the
sequence number.
Fixes: SYS#403
Diffstat (limited to 'src/trau')
-rw-r--r-- | src/trau/osmo_ortp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 89a69ee..fedc977 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -339,6 +339,7 @@ struct osmo_rtp_socket *osmo_rtp_socket_create(void *talloc_ctx, unsigned int fl /* initialize according to the RFC */ rtp_session_set_seq_number(rs->sess, random()); + rs->tx_timestamp = random(); return rs; |