[vlc-devel] VLC Freeze and CPU utilization fixed and could use your advice...

Tony Anecito adanecito at yahoo.com
Thu Feb 7 10:05:39 CET 2008

Hi VLC Team,

I was able to fix the VLC Freezing and CPU utilization
problem by commenting out the following code in the
io.c file:

My question is why is the code looking at
ufd[1].revents specifically? If there is a set of file
descriptiors for the sockets why the interest in this
specific array element? Reason I ask is the poll
function in the poll.c file just iterates through the
entire ufd array and sets the revents based upon the
type of structure located such as read, write and
extended. The extended file or socket descriptor
contains the error codes according to microsoft. So is
the ufd array ufd[0] read sockets, ufd[1] write
sockets and ufd[2] extended socket info and we are
looking at the wrong array element?

As far as the CPU utilization goes because the buffer
is never finished reading it exits and looks like it
comes right back into the net_read function

Now at least I can see the whole video and no high CPU
utilization but I want to make sure connection reset
by peer errors are caught by the code which looks like
what might be attempted by this section of code.


      //  if (ufd[1].revents)
       // {
           // msg_Dbg (p_this, "socket %d polling
interrupted", fd);
           // if (i_total == 0)
           // {
//#if defined(WIN32) || defined(UNDER_CE)
			//	msg_Err (p_this, "io.c net_Read() interrupted
i_total == 0 and ufd[1].revents %d", ufd[1].revents);
               // WSASetLastError (WSAEINTR);
                //errno = EINTR;
               // goto error;
           // break;

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

vlc-devel mailing list
To unsubscribe or modify your subscription options:

More information about the vlc-devel mailing list