Skip to content

Commit

Permalink
Revert to read-write perms (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery authored Apr 30, 2024
1 parent d456f6c commit 1534778
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion v4l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func mmapQueryBuffer(fd uintptr, index uint32, length *uint32) (buffer []byte, e

*length = req.length

buffer, err = unix.Mmap(int(fd), int64(offset), int(req.length), unix.PROT_READ, unix.MAP_SHARED)
buffer, err = unix.Mmap(int(fd), int64(offset), int(req.length), unix.PROT_READ|unix.PROT_WRITE, unix.MAP_SHARED)
return
}

Expand Down
2 changes: 1 addition & 1 deletion webcam.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Control struct {
// Checks if device is a v4l2 device and if it is
// capable to stream video
func Open(path string) (*Webcam, error) {
handle, err := unix.Open(path, unix.O_RDONLY|unix.O_NONBLOCK, 0666)
handle, err := unix.Open(path, unix.O_RDWR|unix.O_NONBLOCK, 0666)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1534778

Please sign in to comment.