[FFmpeg-cvslog] r22706 - trunk/libavformat/rtpenc.c

mstorsjo subversion
Sun Mar 28 10:48:45 CEST 2010


Author: mstorsjo
Date: Sun Mar 28 10:48:45 2010
New Revision: 22706

Log:
Initialize ssrc and base_timestamp using ff_random_get_seed()

Modified:
   trunk/libavformat/rtpenc.c

Modified: trunk/libavformat/rtpenc.c
==============================================================================
--- trunk/libavformat/rtpenc.c	Sun Mar 28 03:15:08 2010	(r22705)
+++ trunk/libavformat/rtpenc.c	Sun Mar 28 10:48:45 2010	(r22706)
@@ -22,6 +22,7 @@
 #include "avformat.h"
 #include "mpegts.h"
 #include "internal.h"
+#include "libavutil/random_seed.h"
 
 #include <unistd.h>
 
@@ -79,11 +80,10 @@ static int rtp_write_header(AVFormatCont
     if (s->payload_type < 0)
         s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
 
-// following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately
-    s->base_timestamp = 0; /* FIXME: was random(), what should this be? */
+    s->base_timestamp = ff_random_get_seed();
     s->timestamp = s->base_timestamp;
     s->cur_timestamp = 0;
-    s->ssrc = 0; /* FIXME: was random(), what should this be? */
+    s->ssrc = ff_random_get_seed();
     s->first_packet = 1;
     s->first_rtcp_ntp_time = ff_ntp_time();
     if (s1->start_time_realtime)



More information about the ffmpeg-cvslog mailing list