diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-15 10:37:12 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-15 10:37:12 +0000 |
commit | b1d55e5e4f9090a67de552e9829208b500d0b1c3 (patch) | |
tree | 961d152981b3692f6e6823f8fbc2ddf2d7fe3f19 /libavformat | |
parent | 2dad0dcec6bcd826afe4e51ff2645bf1be74939c (diff) | |
download | ffmpeg-b1d55e5e4f9090a67de552e9829208b500d0b1c3.tar.gz |
Use AVFormatContext.start_time_realtime in the RTP muxer
Originally committed as revision 22543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 633ce2995c..aea6f0d19a 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -86,6 +86,10 @@ static int rtp_write_header(AVFormatContext *s1) s->ssrc = 0; /* FIXME: was random(), what should this be? */ s->first_packet = 1; s->first_rtcp_ntp_time = ff_ntp_time(); + if (s1->start_time_realtime) + /* Round the NTP time to whole milliseconds. */ + s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 + + NTP_OFFSET_US; max_packet_size = url_fget_max_packet_size(s1->pb); if (max_packet_size <= 12) |