From 4d3d65e1ac1e1025d35b7c3a3735fad2de85270b Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Tue, 12 Dec 2023 11:40:55 +0000 Subject: [PATCH] core: app: Fix stride configuration Set the stride to 0 before validating configurations, so validate will set the correct stride for each configuration. Signed-off-by: William Vinnicombe --- core/rpicam_app.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rpicam_app.cpp b/core/rpicam_app.cpp index cd5a7c05..ac3e5cfb 100644 --- a/core/rpicam_app.cpp +++ b/core/rpicam_app.cpp @@ -1002,6 +1002,8 @@ void RPiCamApp::setupCapture() { // First finish setting up the configuration. + for (auto &config : *configuration_) + config.stride = 0; CameraConfiguration::Status validation = configuration_->validate(); if (validation == CameraConfiguration::Invalid) throw std::runtime_error("failed to valid stream configurations");