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 89fb1efac2 ("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: 89fb1efac2 ("libcamera: simple: Fill stride and frameSize at config validation")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Phi-Bang Nguyen <pnguyen@baylibre.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2020-12-26 23:45:04 +02:00
parent 96bcf66ac7
commit 29bd5583c4
3 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -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";