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 --- libavformat/rtmphttp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libavformat/rtmphttp.c') diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c index 544b493500..499341a173 100644 --- a/libavformat/rtmphttp.c +++ b/libavformat/rtmphttp.c @@ -24,11 +24,10 @@ * RTMP HTTP protocol */ -#include - #include "libavutil/avstring.h" #include "libavutil/intfloat.h" #include "libavutil/opt.h" +#include "libavutil/time.h" #include "internal.h" #include "http.h" @@ -126,7 +125,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size) if (rt->nb_bytes_read == 0) { /* Wait 50ms before retrying to read a server reply in * order to reduce the number of idle requets. */ - usleep(50000); + av_usleep(50000); } if ((ret = rtmp_http_write(h, "", 1)) < 0) -- cgit v1.2.3