summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-10-22 12:40:46 +0300
committerMartin Storsjö <martin@martin.st>2014-10-24 09:53:45 +0300
commit6df9d9b55d3f56ee7782639a7678eeeaf77f14ea (patch)
tree03a66a094e1c9803a25bbd244adcd7c01269655d /libavformat/rtsp.c
parentd0c093021943e9b9c23528b12cd61ca2a5b01b4f (diff)
lavf: Use av_gettime_relative
The ones left using av_gettime are NTP timestamps (for RTCP, which is specified to send the actual current realtime clock in RTCP SR packets), and the NUT muxer timestamper, which is documented as using wallclock time. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 52f52a1056..123d5431f9 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1179,7 +1179,7 @@ start:
}
ffurl_write(rt->rtsp_hd_out, ptr, strlen(ptr));
- rt->last_cmd_time = av_gettime();
+ rt->last_cmd_time = av_gettime_relative();
/* Even if the request from the server had data, it is not the data
* that the caller wants or expects. The memory could also be leaked
* if the actual following reply has content data. */
@@ -1276,7 +1276,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
}
ffurl_write(rt->rtsp_hd_out, send_content, send_content_length);
}
- rt->last_cmd_time = av_gettime();
+ rt->last_cmd_time = av_gettime_relative();
return 0;
}
@@ -1851,7 +1851,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
for (;;) {
if (ff_check_interrupt(&s->interrupt_callback))
return AVERROR_EXIT;
- if (wait_end && wait_end - av_gettime() < 0)
+ if (wait_end && wait_end - av_gettime_relative() < 0)
return AVERROR(EAGAIN);
max_p = 0;
if (rt->rtsp_hd) {
@@ -2050,7 +2050,7 @@ redo:
break;
case RTSP_LOWER_TRANSPORT_CUSTOM:
if (first_queue_st && rt->transport == RTSP_TRANSPORT_RTP &&
- wait_end && wait_end < av_gettime())
+ wait_end && wait_end < av_gettime_relative())
len = AVERROR(EAGAIN);
else
len = ffio_read_partial(s->pb, rt->recvbuf, RECVBUF_SIZE);