diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-10-06 17:26:33 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-10-06 17:26:33 +0000 |
commit | fa298fdd0586f32c551f14bda9b722742a837a00 (patch) | |
tree | dfaa48939a870921a0d5bbeb23b3115657365daa /pjmedia | |
parent | cabfc58ee2a2b30e360afd6250320e4bc6d4f0a1 (diff) |
Changed RTP initial sequence number to be within 15bit number, as required by RFC 3711 (SRTP)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1481 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/src/pjmedia/rtp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/rtp.c b/pjmedia/src/pjmedia/rtp.c index 6dc11fd7..9658a1c4 100644 --- a/pjmedia/src/pjmedia/rtp.c +++ b/pjmedia/src/pjmedia/rtp.c @@ -63,7 +63,8 @@ PJ_DEF(pj_status_t) pjmedia_rtp_session_init( pjmedia_rtp_session *ses, pj_bzero(ses, sizeof(*ses)); /* Initial sequence number SHOULD be random, according to RFC 3550. */ - ses->out_extseq = pj_rand(); + /* According to RFC 3711, it should be random within 2^15 bit */ + ses->out_extseq = pj_rand() & 0x7FFF; ses->peer_ssrc = 0; /* Build default header for outgoing RTP packet. */ |