Browse Source

os_support: fix poll() implementation

Our poll implementation does not iterate over the pollfd array properly
while setting the revents.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 9ac2085dbf)
tags/n0.8
Max Shakhmetov Michael Niedermayer 14 years ago
parent
commit
a41aebf153
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/os_support.c

+ 1
- 1
libavformat/os_support.c View File

@@ -292,7 +292,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
if (rc < 0) if (rc < 0)
return rc; return rc;


for(i = 0; i < (nfds_t) n; i++) {
for(i = 0; i < numfds; i++) {
fds[i].revents = 0; fds[i].revents = 0;


if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN; if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN;


Loading…
Cancel
Save