From 29bd5583c4ebbd62583c12d76d5d0aceb300b649 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 26 Dec 2020 23:45:04 +0200 Subject: libcamera: pipeline: simple: Don't override stride at configure time The stride (and frame size) calculation has been moved from configure time to configuration validate time by commit 89fb1efac240 ("libcamera: simple: Fill stride and frameSize at config validation"). This change has however left one stray setting of the stride when configuring the converter. Fix it. While at it, turn the SimpleConverter::configure() output configuration argument to a const reference to emphasize it can't be null and isn't modified by the function, and rename it from cfg to outputCfg to make its purpose clearer. Fixes: 89fb1efac240 ("libcamera: simple: Fill stride and frameSize at config validation") Signed-off-by: Laurent Pinchart Tested-by: Phi-Bang Nguyen Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/simple/simple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/pipeline/simple/simple.cpp') diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index ea1a2314..1f396612 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -604,7 +604,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) if (useConverter_) { ret = converter_->configure(pipeConfig.pixelFormat, - pipeConfig.captureSize, &cfg); + pipeConfig.captureSize, cfg); if (ret < 0) { LOG(SimplePipeline, Error) << "Unable to configure converter"; -- cgit v1.2.1