mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 17:05:08 +03:00
v4l2: v4l2_camera: Fix stream selection for buffer operations
The buffer operations in V4L2Camera were getting the stream from the wrong place. Fix it. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
e52cc8c916
commit
ae50922879
1 changed files with 3 additions and 3 deletions
|
@ -140,7 +140,7 @@ int V4L2Camera::configure(StreamConfiguration *streamConfigOut,
|
||||||
|
|
||||||
int V4L2Camera::allocBuffers(unsigned int count)
|
int V4L2Camera::allocBuffers(unsigned int count)
|
||||||
{
|
{
|
||||||
Stream *stream = *camera_->streams().begin();
|
Stream *stream = config_->at(0).stream();
|
||||||
|
|
||||||
return bufferAllocator_->allocate(stream);
|
return bufferAllocator_->allocate(stream);
|
||||||
}
|
}
|
||||||
|
@ -149,13 +149,13 @@ void V4L2Camera::freeBuffers()
|
||||||
{
|
{
|
||||||
pendingRequests_.clear();
|
pendingRequests_.clear();
|
||||||
|
|
||||||
Stream *stream = *camera_->streams().begin();
|
Stream *stream = config_->at(0).stream();
|
||||||
bufferAllocator_->free(stream);
|
bufferAllocator_->free(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
FileDescriptor V4L2Camera::getBufferFd(unsigned int index)
|
FileDescriptor V4L2Camera::getBufferFd(unsigned int index)
|
||||||
{
|
{
|
||||||
Stream *stream = *camera_->streams().begin();
|
Stream *stream = config_->at(0).stream();
|
||||||
const std::vector<std::unique_ptr<FrameBuffer>> &buffers =
|
const std::vector<std::unique_ptr<FrameBuffer>> &buffers =
|
||||||
bufferAllocator_->buffers(stream);
|
bufferAllocator_->buffers(stream);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue