Commit ff437ad0 authored by mmu_man's avatar mmu_man

redid usleep() fix for BeOS, more consistant with the MINGW32 one. removed a TAB :P


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1349 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bd6ad41f
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <unistd.h> #include <unistd.h>
#ifdef __BEOS__
# include <OS.h>
#endif
#include "avformat.h" #include "avformat.h"
extern AVInputFormat pgm_iformat; extern AVInputFormat pgm_iformat;
...@@ -42,6 +39,12 @@ extern AVOutputFormat yuv4mpegpipe_oformat; ...@@ -42,6 +39,12 @@ extern AVOutputFormat yuv4mpegpipe_oformat;
# include <windows.h> # include <windows.h>
# define usleep(t) Sleep((t) / 1000) # define usleep(t) Sleep((t) / 1000)
#endif #endif
#ifdef __BEOS__
# ifndef usleep
# include <OS.h>
# define usleep(t) snooze((bigtime_t)(t))
# endif
#endif
#define IMGFMT_YUV 1 #define IMGFMT_YUV 1
#define IMGFMT_PGMYUV 2 #define IMGFMT_PGMYUV 2
...@@ -215,11 +218,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) ...@@ -215,11 +218,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
pts = ((INT64)s->img_number * FRAME_RATE_BASE * 1000000) / (s1->streams[0]->codec.frame_rate); pts = ((INT64)s->img_number * FRAME_RATE_BASE * 1000000) / (s1->streams[0]->codec.frame_rate);
if (pts > nowus) if (pts > nowus)
#ifdef __BEOS__
snooze((bigtime_t)(pts - nowus));
#else
usleep(pts - nowus); usleep(pts - nowus);
#endif
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment