summaryrefslogtreecommitdiff
path: root/tools/aviocat.c
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@trillion01.com>2014-05-06 17:16:50 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-05-17 15:51:58 +0200
commit41120e6e40e34a840d194883a95c57a6e91b1093 (patch)
tree7ffeb02768200a567f0e32989504d7df50bd4698 /tools/aviocat.c
parentb052bccbe4b5533c3f11fddb14df59fb72dbf463 (diff)
downloadffmpeg-41120e6e40e34a840d194883a95c57a6e91b1093.tar.gz
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: Olivier Langlois <olivier@trillion01.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/aviocat.c')
-rw-r--r--tools/aviocat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aviocat.c b/tools/aviocat.c
index 56b918e44d..3bd62b7b48 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);
}
}