v4l2: v4l2_camera_proxy: Don't allow streamon if no buffers have been requested
Make VIDIOC_STREAMON return -EINVAL if no buffers have been allocated with reqbufs. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -630,6 +630,9 @@ int V4L2CameraProxy::vidioc_streamon(V4L2CameraFile *file, int *arg)
|
||||
{
|
||||
LOG(V4L2Compat, Debug) << "Servicing vidioc_streamon fd = " << file->efd();
|
||||
|
||||
if (bufferCount_ == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!validateBufferType(*arg))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user