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
This commit is contained in:
Martin Storsjö
2010-03-10 22:21:39 +00:00
parent 18c31f6ff8
commit 594a9aebbe
3 changed files with 15 additions and 10 deletions

View File

@@ -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;