summaryrefslogtreecommitdiff
path: root/src/cam/sdl_sink.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-06 17:27:37 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-08 17:13:17 +0300
commit4b6e624e6a825aebf171dc1cbe6f2d8d6dde867e (patch)
tree456407e7fae4ec8646e0695cf5aea1908dca3c4b /src/cam/sdl_sink.cpp
parent26c82ce13697e1af5950f4935ecff83c6453f351 (diff)
cam: sdl_texture_yuyv: Make line stride configurable
The line stride of the texture is currently hardcoded based on the image width, which may not match the real stride. Use the stride value from the stream configuration instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Eric Curtin <ecurtin@redhat.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/sdl_sink.cpp')
-rw-r--r--src/cam/sdl_sink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cam/sdl_sink.cpp b/src/cam/sdl_sink.cpp
index 19fdfd6d..a59d0751 100644
--- a/src/cam/sdl_sink.cpp
+++ b/src/cam/sdl_sink.cpp
@@ -68,7 +68,7 @@ int SDLSink::configure(const libcamera::CameraConfiguration &config)
break;
#endif
case libcamera::formats::YUYV:
- texture_ = std::make_unique<SDLTextureYUYV>(rect_);
+ texture_ = std::make_unique<SDLTextureYUYV>(rect_, cfg.stride);
break;
default:
std::cerr << "Unsupported pixel format "