nanosleep patch by François Revol <revol at free dot fr>
authorFrançois Revol <revol@free.fr>
Sun, 21 Jul 2002 07:59:17 +0000 (07:59 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2002 07:59:17 +0000 (07:59 +0000)
Originally committed as revision 784 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 7375b623d2ff43be7222379963d191e60c76424b..82303f577da3728b66a144272eb7a564435c8219 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
 #include <termios.h>
 #include <sys/resource.h>
 #endif
+#ifdef __BEOS__
+/* for snooze() */
+#include <OS.h>
+#endif
 #include <time.h>
 #include <ctype.h>
 
@@ -925,11 +929,15 @@ static int av_encode(AVFormatContext **output_files,
         if (file_index < 0) {
             if (stream_no_data) {
 #ifndef CONFIG_WIN32
+#ifndef __BEOS__
                 struct timespec ts;
 
                 ts.tv_sec = 0;
                 ts.tv_nsec = 1000 * 1000 * 10;
                 nanosleep(&ts, 0);
+#else
+               snooze(10 * 1000); /* mmu_man */ /* in microsec */
+#endif
 #endif
                 stream_no_data = 0;
                 continue;