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:
parent
652247bb6d
commit
84ea0a22d6
|
@ -63,7 +63,8 @@ PJ_DEF(pj_status_t) pjmedia_rtp_session_init( pjmedia_rtp_session *ses,
|
||||||
pj_bzero(ses, sizeof(*ses));
|
pj_bzero(ses, sizeof(*ses));
|
||||||
|
|
||||||
/* Initial sequence number SHOULD be random, according to RFC 3550. */
|
/* 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;
|
ses->peer_ssrc = 0;
|
||||||
|
|
||||||
/* Build default header for outgoing RTP packet. */
|
/* Build default header for outgoing RTP packet. */
|
||||||
|
|
Loading…
Reference in New Issue