Skip to content

Commit 6deb9c5

Browse files
authored
libcamera: fix bytesperline calculation for libcamera0.2 (#140)
For libcamera0.2 configuraiton.stride is already set to some incorrect value and configurations->validate() doesn't update it if it's not 0. For libcamera0.1 it was set to 0. So set it to 0 manually to make sure configurations->validate() computes the correct value.
1 parent 54bdd9d commit 6deb9c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

device/libcamera/buffer_list.cc

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ int libcamera_buffer_list_open(buffer_list_t *buf_list)
9292
}
9393
if (buf_list->fmt.bytesperline > 0) {
9494
configuration.stride = buf_list->fmt.bytesperline;
95+
} else {
96+
configuration.stride = 0;
9597
}
9698
if (buf_list->fmt.nbufs > 0) {
9799
configuration.bufferCount = buf_list->fmt.nbufs;

0 commit comments

Comments
 (0)