Changed RTP initial sequence number to be within 15bit number, as required by RFC 3711 (SRTP)

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1481 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2007-10-06 17:26:33 +00:00
parent 652247bb6d
commit 84ea0a22d6
1 changed files with 2 additions and 1 deletions

View File

@ -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. */