From 4f94b94bff1764d1deadf2c10bb533785d3f882c Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 3 Jan 2011 20:19:05 +0100 Subject: [PATCH] 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. --- gst/gstpoll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/gstpoll.c b/gst/gstpoll.c index af34f66..95be70e 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -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)) -- 2.7.4