changeset 10:7e1ff5580f27 libavformat

Hey, not everyone has usleep() ! (temporary fix, we should check for this in configure)
author mmu_man
date Fri, 20 Dec 2002 00:25:24 +0000
parents 97e61383cb81
children 932b59c66c60
files img.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/img.c	Wed Dec 11 03:20:05 2002 +0000
+++ b/img.c	Fri Dec 20 00:25:24 2002 +0000
@@ -17,6 +17,9 @@
  * 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;
@@ -207,7 +210,11 @@
             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
         }
     }