diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-28 08:48:45 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-28 08:48:45 +0000 |
commit | 4c1202f76eaf27b1eba667039ced7fa9d6cff198 (patch) | |
tree | 8ecc34c575e63facb10b8ea88dd35d8d8a077092 /libavformat/rtpenc.c | |
parent | 9b1db5ec99bb2207116844448d5202ce82dcb060 (diff) | |
download | ffmpeg-4c1202f76eaf27b1eba667039ced7fa9d6cff198.tar.gz |
Initialize ssrc and base_timestamp using ff_random_get_seed()
Originally committed as revision 22706 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index aea6f0d19a..c5441b8312 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -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(AVFormatContext *s1) 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) |