Browse Source

v4l: O_NONBLOCK flag should be OR'ed to O_RDWR or mmap will fail below

Closes #1299
Geraldo Nascimento 3 years ago
parent
commit
5ceaf66079
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/vision/webcamVideoCursorV4L.cxx

+ 1 - 1
panda/src/vision/webcamVideoCursorV4L.cxx

@@ -217,7 +217,7 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) {
 
   int mode = O_RDWR;
   if (!v4l_blocking) {
-    mode = O_NONBLOCK;
+    mode |= O_NONBLOCK;
   }
 
   _fd = open(src->_device.c_str(), mode);