changeset 12:d58c983a19a7 libavformat

redid usleep() fix for BeOS, more consistant with the MINGW32 one. removed a TAB :P
author mmu_man
date Fri, 20 Dec 2002 21:04:08 +0000
parents 932b59c66c60
children 8a5285a0ca2f
files img.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/img.c	Fri Dec 20 19:25:10 2002 +0000
+++ b/img.c	Fri Dec 20 21:04:08 2002 +0000
@@ -17,9 +17,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <unistd.h>
-#ifdef __BEOS__
-# include <OS.h>
-#endif
 #include "avformat.h"
 
 extern AVInputFormat pgm_iformat;
@@ -40,7 +37,13 @@
 
 #ifdef __MINGW32__
 #  include <windows.h>
-#  define usleep(t)	Sleep((t) / 1000)
+#  define usleep(t)    Sleep((t) / 1000)
+#endif
+#ifdef __BEOS__
+#  ifndef usleep
+#    include <OS.h>
+#    define usleep(t)    snooze((bigtime_t)(t))
+#  endif
 #endif
 
 #define IMGFMT_YUV     1
@@ -215,11 +218,7 @@
             pts = ((INT64)s->img_number * FRAME_RATE_BASE * 1000000) / (s1->streams[0]->codec.frame_rate);
 
             if (pts > nowus)
-#ifdef __BEOS__
-                snooze((bigtime_t)(pts - nowus));
-#else
                 usleep(pts - nowus);
-#endif
         }
     }