using poll() only for DVB card - not required for file write

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2067 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-10-03 23:34:15 +00:00
parent 580123b315
commit f645dd3d29
1 changed files with 8 additions and 2 deletions

View File

@ -21,10 +21,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/poll.h>
#ifdef HAVE_DVB
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
@ -251,9 +252,10 @@ static void draw_osd(void)
#endif
}
#define NFD 2
static void my_write(unsigned char* data,int len){
#ifdef HAVE_DVB
#define NFD 2
struct pollfd pfd[NFD];
// printf("write %d bytes \n",len);
@ -278,6 +280,10 @@ static void my_write(unsigned char* data,int len){
} else usleep(1000);
}
}
#else
write(vo_mpegpes_fd,data,len); // write to file
#endif
}
static unsigned char pes_header[PES_MAX_SIZE];