diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-10 22:21:39 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-10 22:21:39 +0000 |
commit | 594a9aebbebeb64f0476d1089d96e8670cd08bf3 (patch) | |
tree | c1d03c79f8ba0ccaaa6cca1d59d6aa981eca74f8 /libavformat/utils.c | |
parent | 18c31f6ff8eef83cd19ea9e431335a854156dd18 (diff) | |
download | ffmpeg-594a9aebbebeb64f0476d1089d96e8670cd08bf3.tar.gz |
Make the ntp_time function available to other parts of libavformat, as ff_ntp_time
Originally committed as revision 22438 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 2b579ca67d..b2ecf13bb1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3073,6 +3073,14 @@ int64_t av_gettime(void) return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; } +#define NTP_OFFSET 2208988800ULL +#define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) + +uint64_t ff_ntp_time(void) +{ + return (av_gettime() / 1000) * 1000 + NTP_OFFSET_US; +} + int64_t parse_date(const char *datestr, int duration) { const char *p; |