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:
parent
609036a9e6
commit
4d150c7faf
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue