Commit 0fd60ac8 authored by John Bassett's avatar John Bassett Committed by Olivier Crête
Browse files

rtpbasepayload: restrict initial random sequence number to be <= 32767

In order to prevent SRTP roll over counter issues the initial sequence
number is restricted to <= 32767. This is recommended by RFC 4568 section 6.4.
parent cceb3303
......@@ -1307,7 +1307,7 @@ gst_rtp_base_payload_change_state (GstElement * element,
gst_event_replace (&rtpbasepayload->priv->pending_segment, NULL);
if (priv->seqnum_offset_random)
rtpbasepayload->seqnum_base = g_random_int_range (0, G_MAXUINT16);
rtpbasepayload->seqnum_base = g_random_int_range (0, G_MAXINT16);
else
rtpbasepayload->seqnum_base = rtpbasepayload->seqnum_offset;
priv->next_seqnum = rtpbasepayload->seqnum_base;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment