summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@trillion01.com>2014-05-06 17:16:50 -0400
committerMartin Storsjö <martin@martin.st>2014-10-24 09:53:43 +0300
commite205429fcf9de3182bce2f4cfd1d6401596a8666 (patch)
tree76eaba69e80b6aacb8512af08da3f56e29dd21c5 /tools
parent6fdf35fe35d8c1c467708238100648a7a47c930d (diff)
tools: 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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tools')
-rw-r--r--tools/aviocat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aviocat.c b/tools/aviocat.c
index 6a33a7c8fd..59244a8e4f 100644
--- a/tools/aviocat.c
+++ b/tools/aviocat.c
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
goto fail;
}
- start_time = av_gettime();
+ start_time = av_gettime_relative();
while (1) {
uint8_t buf[1024];
int n;
@@ -93,7 +93,7 @@ int main(int argc, char **argv)
stream_pos += n;
if (bps) {
avio_flush(output);
- while ((av_gettime() - start_time) * bps / AV_TIME_BASE < stream_pos)
+ while ((av_gettime_relative() - start_time) * bps / AV_TIME_BASE < stream_pos)
av_usleep(50 * 1000);
}
}