summaryrefslogtreecommitdiff
path: root/avplay.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-21 20:31:44 +0100
committerMans Rullgard <mans@mansr.com>2012-06-22 17:15:36 +0100
commit896bb0d742a513b1bb5b9a770dbffd2cd436bed6 (patch)
treebc133c53f4cd418c8b42c6d12958e719900ebb6e /avplay.c
parentd3d3a32c9d389cc0d6a91b389988a225ae01c948 (diff)
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 <mans@mansr.com>
Diffstat (limited to 'avplay.c')
-rw-r--r--avplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/avplay.c b/avplay.c
index e9389ffe65..6acb6c10e8 100644
--- a/avplay.c
+++ b/avplay.c
@@ -31,6 +31,7 @@
#include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
+#include "libavutil/time.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
@@ -54,7 +55,6 @@
#undef main /* We don't want SDL to override our main() */
#endif
-#include <unistd.h>
#include <assert.h>
const char program_name[] = "avplay";
@@ -952,7 +952,7 @@ static int refresh_thread(void *opaque)
is->refresh = 1;
SDL_PushEvent(&event);
}
- usleep(is->audio_st && is->show_audio ? rdftspeed * 1000 : 5000); // FIXME ideally we should wait the correct time but SDLs event passing is so slow it would be silly
+ av_usleep(is->audio_st && is->show_audio ? rdftspeed * 1000 : 5000); // FIXME ideally we should wait the correct time but SDLs event passing is so slow it would be silly
}
return 0;
}