From 896bb0d742a513b1bb5b9a770dbffd2cd436bed6 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 21 Jun 2012 20:31:44 +0100 Subject: Replace usleep() calls with av_usleep() This reduces the dependency on unistd.h which is not available on all systems. Signed-off-by: Mans Rullgard --- tools/aviocat.c | 4 ++-- tools/pktdumper.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/aviocat.c b/tools/aviocat.c index f5da526ba9..52a96bde2f 100644 --- a/tools/aviocat.c +++ b/tools/aviocat.c @@ -20,8 +20,8 @@ #include #include -#include +#include "libavutil/time.h" #include "libavformat/avformat.h" static int usage(const char *argv0, int ret) @@ -82,7 +82,7 @@ int main(int argc, char **argv) if (bps) { avio_flush(output); while ((av_gettime() - start_time) * bps / AV_TIME_BASE < stream_pos) - usleep(50 * 1000); + av_usleep(50 * 1000); } } diff --git a/tools/pktdumper.c b/tools/pktdumper.c index c3a3a218ef..d23cd9674f 100644 --- a/tools/pktdumper.c +++ b/tools/pktdumper.c @@ -25,6 +25,7 @@ #include #include +#include "libavutil/time.h" #include "libavformat/avformat.h" #define PKTFILESUFF "_%08" PRId64 "_%02d_%010" PRId64 "_%06d_%c.bin" @@ -122,7 +123,7 @@ int main(int argc, char **argv) avformat_close_input(&fctx); while (donotquit) - usleep(60 * 1000000); + av_usleep(60 * 1000000); return 0; } -- cgit v1.2.3