diff options
author | Olivier Langlois <olivier@trillion01.com> | 2014-05-06 17:16:51 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-17 20:13:33 +0200 |
commit | f78bc96b7c1c74caf99a7139cf81ce1110404965 (patch) | |
tree | f160505f5f94cc30a1ce0f04fb643f82563470d4 /libavformat/avio.c | |
parent | 9986e50a6ec8b4500557c3b17188615558a76069 (diff) | |
download | ffmpeg-f78bc96b7c1c74caf99a7139cf81ce1110404965.tar.gz |
lavf: Use av_gettime_relative()
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 4edaaa6215..0a2a0a9aab 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -312,8 +312,8 @@ static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf, } else { if (h->rw_timeout) { if (!wait_since) - wait_since = av_gettime(); - else if (av_gettime() > wait_since + h->rw_timeout) + wait_since = av_gettime_relative(); + else if (av_gettime_relative() > wait_since + h->rw_timeout) return AVERROR(EIO); } av_usleep(1000); |