Mercurial > mplayer.hg
changeset 2066:2b14cad013b7
using poll() only for DVB card - not required for file write
author | arpi |
---|---|
date | Wed, 03 Oct 2001 23:34:15 +0000 |
parents | 147e114e906b |
children | a5a4143d5599 |
files | libvo/vo_mpegpes.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_mpegpes.c Wed Oct 03 21:42:23 2001 +0000 +++ b/libvo/vo_mpegpes.c Wed Oct 03 23:34:15 2001 +0000 @@ -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 @@ #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 @@ } else usleep(1000); } } + +#else + write(vo_mpegpes_fd,data,len); // write to file +#endif } static unsigned char pes_header[PES_MAX_SIZE];