v4l2: camera_proxy: Call V4L2Camera::getBufferFd() directly

The V4L2Camera::getBufferFd() method doesn't need to run in the camera
thread. Call it directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-01-05 01:29:02 +02:00 committed by Niklas Söderlund
parent 3c4b872443
commit 6a735f014a

View file

@ -92,8 +92,7 @@ void *V4L2CameraProxy::mmap(void *addr, size_t length, int prot, int flags,
return MAP_FAILED;
}
FileDescriptor fd = vcam_->invokeMethod(&V4L2Camera::getBufferFd,
ConnectionTypeBlocking, index);
FileDescriptor fd = vcam_->getBufferFd(index);
if (!fd.isValid()) {
errno = EINVAL;
return MAP_FAILED;