[vlc-commits] v4l2: do not poll for POLLPRI

Rémi Denis-Courmont git at videolan.org
Fri Apr 13 18:56:54 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Apr 13 19:55:40 2012 +0300| [08ccf731e308a81586d4ebaa4b2218b594016ad2] | committer: Rémi Denis-Courmont

v4l2: do not poll for POLLPRI

We do not dequeue those events. That could cause busy loops.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08ccf731e308a81586d4ebaa4b2218b594016ad2
---

 modules/access/v4l2/access.c |    2 +-
 modules/access/v4l2/demux.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/access/v4l2/access.c b/modules/access/v4l2/access.c
index 3d6a095..353ad05 100644
--- a/modules/access/v4l2/access.c
+++ b/modules/access/v4l2/access.c
@@ -218,7 +218,7 @@ static block_t *AccessRead( access_t *access )
 
     struct pollfd fd;
     fd.fd = sys->fd;
-    fd.events = POLLIN|POLLPRI;
+    fd.events = POLLIN;
     fd.revents = 0;
 
     /* Wait for data */
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index f440159..dcebbb9 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -488,7 +488,7 @@ static void *StreamThread (void *data)
     struct pollfd ufd[1];
 
     ufd[0].fd = fd;
-    ufd[0].events = POLLIN | POLLPRI;
+    ufd[0].events = POLLIN;
 
     for (;;)
     {
@@ -523,7 +523,7 @@ static void *ReadThread (void *data)
     struct pollfd ufd[1];
 
     ufd[0].fd = fd;
-    ufd[0].events = POLLIN | POLLPRI;
+    ufd[0].events = POLLIN;
 
     for (;;)
     {



More information about the vlc-commits mailing list