summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-01-16 16:25:26 -0300
committerJames Almer <jamrial@gmail.com>2020-01-16 22:27:35 -0300
commitab9627223e630390a8a99c052de2fb82abde2746 (patch)
treec1b19bb0847a29d4545a6c73f54d5dc36956aeef /libavformat/rtpenc.c
parent80c3a15a1b620bc0cb5e8f5269bb3a0f514c339e (diff)
downloadffmpeg-ab9627223e630390a8a99c052de2fb82abde2746.tar.gz
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/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index b4f2504123..63047beccc 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -124,7 +124,7 @@ static int rtp_write_header(AVFormatContext *s1)
if (!s->ssrc)
s->ssrc = av_get_random_seed();
s->first_packet = 1;
- s->first_rtcp_ntp_time = ff_ntp_time(av_gettime());
+ s->first_rtcp_ntp_time = ff_ntp_time();
if (s1->start_time_realtime != 0 && s1->start_time_realtime != AV_NOPTS_VALUE)
/* Round the NTP time to whole milliseconds. */
s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 +
@@ -526,9 +526,9 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
RTCP_TX_RATIO_DEN;
if ((s->first_packet || ((rtcp_bytes >= RTCP_SR_SIZE) &&
- (ff_ntp_time(av_gettime()) - s->last_rtcp_ntp_time > 5000000))) &&
+ (ff_ntp_time() - s->last_rtcp_ntp_time > 5000000))) &&
!(s->flags & FF_RTP_FLAG_SKIP_RTCP)) {
- rtcp_send_sr(s1, ff_ntp_time(av_gettime()), 0);
+ rtcp_send_sr(s1, ff_ntp_time(), 0);
s->last_octet_count = s->octet_count;
s->first_packet = 0;
}
@@ -642,7 +642,7 @@ static int rtp_write_trailer(AVFormatContext *s1)
/* If the caller closes and recreates ->pb, this might actually
* be NULL here even if it was successfully allocated at the start. */
if (s1->pb && (s->flags & FF_RTP_FLAG_SEND_BYE))
- rtcp_send_sr(s1, ff_ntp_time(av_gettime()), 1);
+ rtcp_send_sr(s1, ff_ntp_time(), 1);
av_freep(&s->buf);
return 0;