mirror of https://github.com/mpv-player/mpv
replace sleep with usec_sleep, required for recent mingw versions, patch by Robert Swain <robert.swain at gmail.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16373 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f3952d762c
commit
ac2c5730ce
|
@ -146,7 +146,7 @@ static void uninit(sh_audio_t *sh)
|
|||
case ACMERR_BUSY:
|
||||
case ACMERR_CANCELED:
|
||||
mp_msg(MSGT_WIN32, MSGL_DBG2, "ACM_Decoder: stream busy, waiting..\n");
|
||||
sleep(100);
|
||||
usec_sleep(100000000);
|
||||
return(uninit(sh));
|
||||
case ACMERR_UNPREPARED:
|
||||
case ACMERR_NOTPOSSIBLE:
|
||||
|
|
|
@ -225,7 +225,7 @@ static int rm_write(int s, const char *buf, int len) {
|
|||
#else
|
||||
if ((timeout>0) && ((errno == EAGAIN) || (WSAGetLastError() == WSAEINPROGRESS))) {
|
||||
#endif
|
||||
sleep (1); timeout--;
|
||||
usec_sleep (1000000); timeout--;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ static int write_stream(int s, const char *buf, int len) {
|
|||
#else
|
||||
if ((timeout>0) && ((errno == EAGAIN) || (WSAGetLastError() == WSAEINPROGRESS))) {
|
||||
#endif
|
||||
sleep (1); timeout--;
|
||||
usec_sleep (1000000); timeout--;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue