summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/simple/converter.cpp5
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
index 6f4e41db..550b2bcf 100644
--- a/src/libcamera/pipeline/simple/converter.cpp
+++ b/src/libcamera/pipeline/simple/converter.cpp
@@ -159,6 +159,8 @@ int SimpleConverter::configure(const StreamConfiguration &inputCfg,
V4L2DeviceFormat format;
format.fourcc = videoFormat;
format.size = inputCfg.size;
+ format.planesCount = 1;
+ format.planes[0].bpl = inputCfg.stride;
ret = m2m_->output()->setFormat(&format);
if (ret < 0) {
@@ -167,7 +169,8 @@ int SimpleConverter::configure(const StreamConfiguration &inputCfg,
return ret;
}
- if (format.fourcc != videoFormat || format.size != inputCfg.size) {
+ if (format.fourcc != videoFormat || format.size != inputCfg.size ||
+ format.planes[0].bpl != inputCfg.stride) {
LOG(SimplePipeline, Error)
<< "Input format not supported";
return -EINVAL;
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index cb8309ca..2f6dff16 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -606,6 +606,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
StreamConfiguration inputCfg;
inputCfg.pixelFormat = pipeConfig.pixelFormat;
inputCfg.size = pipeConfig.captureSize;
+ inputCfg.stride = captureFormat.planes[0].bpl;
ret = converter_->configure(inputCfg, cfg);
if (ret < 0) {