module-rtp: improve SSRC, seq and timestamp randomness

This commit is contained in:
Wim Taymans 2023-02-22 11:54:27 +01:00
parent eca9bbf73b
commit 56d2e1e880
3 changed files with 33 additions and 14 deletions

View file

@ -647,7 +647,9 @@ static struct session *session_new_announce(struct impl *impl, struct node *node
sess->announce = true;
sdp->hash = rand();
if ((res = pw_getrandom(&sdp->hash, sizeof(sdp->hash), 0)) < 0)
return NULL;
sdp->ntp = (uint32_t) time(NULL) + 2208988800U;
sess->props = props;