aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2002-11-02 10:35:07 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-11-02 10:35:07 +0000
commit9ddd71fc6063b357344f81a0f704c1d04f584ada (patch)
tree87e9377d16bd2a22727ca6f572ba312f167d258f /ffmpeg.c
parentbbd8335b69b4960b2a6e830317f189748232c749 (diff)
downloadffmpeg-9ddd71fc6063b357344f81a0f704c1d04f584ada.tar.gz
added BeOS net_server support (R5 network stack), basically the same
problems as with winsock (sockets != fd), and the broken select(). based on older patch by Andrew Bachmann. patch by (François Revol <revol at free dot fr>) Originally committed as revision 1144 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 46b4f0098a..a969340118 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -27,10 +27,6 @@
#include <termios.h>
#include <sys/resource.h>
#endif
-#ifdef __BEOS__
-/* for snooze() */
-#include <OS.h>
-#endif
#include <time.h>
#include <ctype.h>
@@ -227,14 +223,18 @@ static void term_init(void)
tcsetattr (0, TCSANOW, &tty);
atexit(term_exit);
+#ifdef CONFIG_BEOS_NETSERVER
+ fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
+#endif
}
/* read a key without blocking */
static int read_key(void)
{
- struct timeval tv;
- int n;
+ int n = 1;
unsigned char ch;
+#ifndef CONFIG_BEOS_NETSERVER
+ struct timeval tv;
fd_set rfds;
FD_ZERO(&rfds);
@@ -242,6 +242,7 @@ static int read_key(void)
tv.tv_sec = 0;
tv.tv_usec = 0;
n = select(1, &rfds, NULL, NULL, &tv);
+#endif
if (n > 0) {
n = read(0, &ch, 1);
if (n == 1)