---
libavformat/rtpenc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 0f5307d..8013f06 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -124,6 +124,10 @@ static int rtp_write_header(AVFormatContext *s1)
/* Round the NTP time to whole milliseconds. */
s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 +
NTP_OFFSET_US;
+ // Pick a random sequence start number, but in the lower end of the
+ // available range, so that any wraparound doesn't happen immediately.
+ // (Immediate wraparound would be an issue for SRTP.)
+ s->seq = av_get_random_seed() & 0x0fff;
if (s1->packet_size) {
if (s1->pb->max_packet_size)
--
1.7.9.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel