[FFmpeg-cvslog] r9096 - trunk/libavformat/os_support.c

alex subversion
Mon May 21 18:08:03 CEST 2007


Author: alex
Date: Mon May 21 18:08:03 2007
New Revision: 9096

Log:
r9095 invalidly removed the check for non-winsock

Modified:
   trunk/libavformat/os_support.c

Modified: trunk/libavformat/os_support.c
==============================================================================
--- trunk/libavformat/os_support.c	(original)
+++ trunk/libavformat/os_support.c	Mon May 21 18:08:03 2007
@@ -139,10 +139,12 @@ int poll(struct pollfd *fds, nfds_t numf
     int n;
     int rc;
 
+#ifdef __MINGW32__
     if (numfds >= FD_SETSIZE) {
         errno = EINVAL;
         return -1;
     }
+#endif
 
     FD_ZERO(&read_set);
     FD_ZERO(&write_set);
@@ -152,6 +154,12 @@ int poll(struct pollfd *fds, nfds_t numf
     for(i = 0; i < numfds; i++) {
         if (fds[i].fd < 0)
             continue;
+#ifndef __MINGW32__
+        if (fds[i].fd >= FD_SETSIZE) {
+            errno = EINVAL;
+            return -1;
+        }
+#endif
 
         if (fds[i].events & POLLIN)  FD_SET(fds[i].fd, &read_set);
         if (fds[i].events & POLLOUT) FD_SET(fds[i].fd, &write_set);




More information about the ffmpeg-cvslog mailing list