Revision 9ddd71fc ffmpeg.c

View differences:

ffmpeg.c
27 27
#include <termios.h>
28 28
#include <sys/resource.h>
29 29
#endif
30
#ifdef __BEOS__
31
/* for snooze() */
32
#include <OS.h>
33
#endif
34 30
#include <time.h>
35 31
#include <ctype.h>
36 32

  
......
227 223
    tcsetattr (0, TCSANOW, &tty);
228 224

  
229 225
    atexit(term_exit);
226
#ifdef CONFIG_BEOS_NETSERVER
227
    fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
228
#endif
230 229
}
231 230

  
232 231
/* read a key without blocking */
233 232
static int read_key(void)
234 233
{
235
    struct timeval tv;
236
    int n;
234
    int n = 1;
237 235
    unsigned char ch;
236
#ifndef CONFIG_BEOS_NETSERVER
237
    struct timeval tv;
238 238
    fd_set rfds;
239 239

  
240 240
    FD_ZERO(&rfds);
......
242 242
    tv.tv_sec = 0;
243 243
    tv.tv_usec = 0;
244 244
    n = select(1, &rfds, NULL, NULL, &tv);
245
#endif
245 246
    if (n > 0) {
246 247
        n = read(0, &ch, 1);
247 248
        if (n == 1)

Also available in: Unified diff