[vlc-devel] vlc: svn commit r25020 (courmisch)

Tony Anecito adanecito at yahoo.com
Sat Feb 9 22:05:52 CET 2008


Hi Courmisch,

I tried your fix and it did not solve the problem.

What is happening is in the poll.c file the poll()
function is setting the revents to 0 for the
fds[i1].fd
because most of the time the fd retrieved from the
waitpipe does not match the one retrieved from the
select function for rdset and wrset (do not ask me why
exset is not event used in select and yet it is
checked) thus revents is 0 and in io.c the check for
interrupted function does not generate the error.
But, at one point in time the fd from waitpipe does
match the rdset or wrset and the revents is set for
the fd[1].revents thus then in io.c the check for
ufd[1]revents causes the failure. That is why I added
the check for fd[1].fd being non-negative when the
match does occur.

So my questions are:
1. Why does the fd from wait pipe fail the FD_ISSET
most of the time during the beginning of the movie but
is found to match later in the movie? For the
ufd[0].fd there is always a matching rdset or wrset
thus the revents is set to POLLIN and works with the
io.c code.

2. Why is finding the matching fd in rdset & wrset
considered a interrupted function when fd is not -1?

3. Why is exset checked yet it is not passed into the
select but instead a null is passed. Does that not
mean exset should not be checked using FD_ISSET?

Thanks for any help.
-Tony


for (unsigned i = 0; i < nfds; i++)
    {
        int fd = fds[i].fd;
        fds[i].revents = (FD_ISSET (fd, &rdset) ?
POLLIN : 0)
                       | (FD_ISSET (fd, &wrset) ?
POLLOUT : 0)
                       | (FD_ISSET (fd, &exset) ?
POLLPRI : 0);

    }
--- Subversion daemon <svn at videolan.org> wrote:

> r25020 | courmisch | 2008-02-09 09:32:05 +0100 (Sat,
> 09 Feb 2008) | 2 lines
> Changed paths:
>    M /trunk/src/network/io.c
> 
> Handle waitpipe error failures.
> 
>  > http://trac.videolan.org/vlc/changeset/25020
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list