diff options
author | James Almer <jamrial@gmail.com> | 2020-01-16 16:25:26 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-01-16 22:27:35 -0300 |
commit | ab9627223e630390a8a99c052de2fb82abde2746 (patch) | |
tree | c1b19bb0847a29d4545a6c73f54d5dc36956aeef /libavformat/movenc.c | |
parent | 80c3a15a1b620bc0cb5e8f5269bb3a0f514c339e (diff) |
Revert "avformat/utils: make ff_ntp_time() accept a timestamp as input argument"
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a2cfc59b89..9111ac300c 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4657,10 +4657,12 @@ static int mov_write_prft_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks) if (mov->write_prft == MOV_PRFT_SRC_WALLCLOCK) { if (first_track->cluster[0].prft.wallclock) { - ntp_ts = ff_get_formatted_ntp_time(ff_ntp_time(first_track->cluster[0].prft.wallclock)); + /* Round the NTP time to whole milliseconds. */ + ntp_ts = ff_get_formatted_ntp_time((first_track->cluster[0].prft.wallclock / 1000) * 1000 + + NTP_OFFSET_US); flags = first_track->cluster[0].prft.flags; } else - ntp_ts = ff_get_formatted_ntp_time(ff_ntp_time(av_gettime())); + ntp_ts = ff_get_formatted_ntp_time(ff_ntp_time()); } else if (mov->write_prft == MOV_PRFT_SRC_PTS) { pts_us = av_rescale_q(first_track->cluster[0].pts, first_track->st->time_base, AV_TIME_BASE_Q); |