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>
This commit is contained in:
Mans Rullgard
2012-06-21 20:31:44 +01:00
parent d3d3a32c9d
commit 896bb0d742
8 changed files with 18 additions and 19 deletions

View File

@ -24,11 +24,10 @@
* RTMP HTTP protocol
*/
#include <unistd.h>
#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)