Hey, not everyone has usleep() ! (temporary fix, we should check for this in configure)

Originally committed as revision 1343 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
François Revol 22 years ago
parent f7696989d9
commit 9ca7cfc5c4
  1. 7
      libavformat/img.c

@ -17,6 +17,9 @@
* 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;
@ -207,7 +210,11 @@ 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
} }
} }

Loading…
Cancel
Save