[vlc-devel] Re: vlc & hauppauge pvr350

Gildas Bazin gbazin at altern.org
Tue Aug 24 08:57:05 CEST 2004

On Monday 23 August 2004 23:40, Daniel Lawson wrote:
> I've strace()d the program, and it spins on the above select() waiting 
> for input. IE, it *always* times out. This is reading from a device that 
> *always* has input available - I can cat /dev/video0 to a file and will 
> always be able to read from it. Yet the code as it stood spins on 
> select(), and never gets out of the while loop.
> I've also added debugging output within the loop, which gets executed 
> every .5 seconds (select() timeout), and debugging output outside the 
> loop, which never gets executed.
> So, yes, your codepath is correct. As I said, don't debug someone elses 
> code at midnight.
> Select() returns 0, hence a timeout. However, it *shouldn't*. There 
> should always be data available to read off this card. Do we even need 
> to select() off this device?

We do need select() to avoid blocking indefinitely on the read() in case 
there isn't any data coming out of the card.

The fact that select() doesn't work in your case strongly suggests you have 
a buggy PVR driver. To work around this you can remove the select() 
alltogether if you want.


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list