Skip to content

Commit 065b554

Browse files
committed
fix: crash if stride not equal to stride
1 parent 4ef0a2c commit 065b554

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/capturer/libcamera_capturer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ LibcameraCapturer &LibcameraCapturer::SetFormat(int width, int height) {
8484

8585
INFO_PRINT(" width: %d, height: %d, stride: %d", width_, height_, stride_);
8686

87+
if (width_ != stride_) {
88+
ERROR_PRINT("Stride is not equal to width");
89+
exit(1);
90+
}
91+
8792
return *this;
8893
}
8994

0 commit comments

Comments
 (0)