[vlc-devel] commit: Use polling instead of msleep in v4l2 access_demux. ( Antoine Cellerier )

Rémi Denis-Courmont rem at videolan.org
Sun Jan 4 10:52:03 CET 2009


Le samedi 3 janvier 2009, git version control a écrit :
> vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Mon
> Oct 27 17:35:55 2008 -0700|
> [711c318b5e7cb7b2662109099fdc847695ed261f] | committer: Antoine
> Cellerier
>
> Use polling instead of msleep in v4l2 access_demux.
>
> I'm not sure about the polltimeout. I'd settle for an infinite
> timeout but then VLC might behavior on exit might be messed up.

At the moment, pf_demux is not preemptible. So indeed, VLC will deadlock 
stopping up if you use an infinite timeout :(

That being noted, I suspect this poll() invocation will busy loop in 
case of POLLERR or POLLHUP, although I don't know if these events are 
legal for V4L(2) and OSS file descriptors. After the separation of 
OSS/ALSA from V4L(2), you only seem to ever wait on a single 
descriptor... Probably the simplest fix is to try to read whenever 
poll() returns 1, and ignore the revents value completely.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list