On 2012-01-25 13:48:47 +0200, Martin Storsjö wrote:
> Mingw doesn't have sleep, only _sleep (which is deprecated),
> Sleep (which is defined in winbase.h and not in the standard
> C headers) and usleep.
> ---
>  tools/pktdumper.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/pktdumper.c b/tools/pktdumper.c
> index e9e5acf..15da190 100644
> --- a/tools/pktdumper.c
> +++ b/tools/pktdumper.c
> @@ -26,6 +26,10 @@
>  #include <unistd.h>
>  #include "libavformat/avformat.h"
>  
> +#ifdef _WIN32
> +#define sleep(x) usleep((x)*10001000)

missing multiplication? that sleeps ~x*10 seconds. also replacing
the single sleep with usleep is imho preferable over the ifdefs.

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to