[libcamera-devel] [PATCH v2 3/8] libcamera: v4l2_device: streamOff() when releasing buffers
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Feb 13 16:41:53 CET 2019
Hi Kieran,
Thank you for the patch.
On Wed, Feb 13, 2019 at 03:10:22PM +0000, Kieran Bingham wrote:
> We must ensure that the stream is disabled before releasing buffers. It will
> not hurt to call streamOff() even if it is already off before releasing any
> buffers back to the device.
I'm not sure about this one. Doesn't it indicate a problem in the caller
instead ?
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/libcamera/v4l2_device.cpp | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index 23c0da295905..83073c28b817 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -642,6 +642,8 @@ int V4L2Device::releaseBuffers()
> {
> LOG(V4L2, Debug) << "Releasing bufferPool";
>
> + streamOff();
> +
> requestBuffers(0);
> bufferPool_ = nullptr;
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list