gstpoll: Only take into account active fds

This is needed so that select properly errors out on macosx (sigh)
This commit is contained in:
Edward Hervey 2009-10-12 12:01:59 +02:00
parent dc3fb58a90
commit edce400c79

View file

@ -297,7 +297,7 @@ pollfd_to_fd_set (GstPoll * set, fd_set * readfds, fd_set * writefds,
FD_SET (pfd->fd, writefds);
if (pfd->events)
FD_SET (pfd->fd, errorfds);
if (pfd->fd > max_fd)
if (pfd->fd > max_fd && (pfd->events & (POLLIN | POLLOUT)))
max_fd = pfd->fd;
}
}