Skip to content

Commit

Permalink
add missing bracket; fix address issue (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazile-clyde authored Apr 11, 2023
1 parent b5cdb70 commit 32744c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions v4l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func getFrameSize(fd uintptr, index uint32, code uint32) (frameSize FrameSize, e

func getName(fd uintptr) (string, error) {
var caps v4l2_capability
if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(caps))); err != nil {
if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(&caps))); err != nil {
return "", err
}

Expand All @@ -324,7 +324,7 @@ func getName(fd uintptr) (string, error) {

func getBusInfo(fd uintptr) (string, error) {
var caps v4l2_capability
if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(caps))); err != nil {
if err := ioctl.Ioctl(fd, VIDIOC_QUERYCAP, uintptr(unsafe.Pointer(&caps))); err != nil {
return "", err
}

Expand Down
3 changes: 2 additions & 1 deletion webcam.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ func (w *Webcam) GetName() (string, error) {
// GetBusInfo returns the location of the device in the system
func (w *Webcam) GetBusInfo() (string, error) {
return getBusInfo(w.fd)

}

// SelectInput selects the current video input.
func (w *Webcam) SelectInput(index uint32) error {
return selectInput(w.fd, index)
Expand Down

0 comments on commit 32744c2

Please sign in to comment.