summaryrefslogtreecommitdiffstats
path: root/libavformat/img.c
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2002-12-20 00:25:24 +0000
committerFrançois Revol <revol@free.fr>2002-12-20 00:25:24 +0000
commit9ca7cfc5c4abe50e4776dbc7c51a59e402c4273f (patch)
treeafece1fb4ba2904cb1c68b1a0e867fb34c6dbcbe /libavformat/img.c
parentf7696989d9efb71844830f32ea2f2248f0a85868 (diff)
downloadffmpeg-streaming-9ca7cfc5c4abe50e4776dbc7c51a59e402c4273f.zip
ffmpeg-streaming-9ca7cfc5c4abe50e4776dbc7c51a59e402c4273f.tar.gz
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
Diffstat (limited to 'libavformat/img.c')
-rw-r--r--libavformat/img.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/img.c b/libavformat/img.c
index 5f93450..189ef6e 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -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 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
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
}
}
OpenPOWER on IntegriCloud