gstpoll: Fix for (p)select backend

We need to reset the revents field of each pollfd when reading the results
from select else we'll end up with stray info from previous calls to
select.
This commit is contained in:
Edward Hervey 2011-01-03 20:19:05 +01:00
parent ee5b369ffd
commit 4f94b94bff

View file

@ -376,6 +376,7 @@ fd_set_to_pollfd (GstPoll * set, fd_set * readfds, fd_set * writefds,
struct pollfd *pfd = &g_array_index (set->active_fds, struct pollfd, i);
if (pfd->fd < FD_SETSIZE) {
pfd->revents = 0;
if (FD_ISSET (pfd->fd, readfds))
pfd->revents |= POLLIN;
if (FD_ISSET (pfd->fd, writefds))