Skip to content

Commit

Permalink
libcamera: fix bytesperline calculation for libcamera0.2 (#140)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
KapJI authored Mar 8, 2024
1 parent 54bdd9d commit 6deb9c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions device/libcamera/buffer_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ int libcamera_buffer_list_open(buffer_list_t *buf_list)
}
if (buf_list->fmt.bytesperline > 0) {
configuration.stride = buf_list->fmt.bytesperline;
} else {
configuration.stride = 0;
}
if (buf_list->fmt.nbufs > 0) {
configuration.bufferCount = buf_list->fmt.nbufs;
Expand Down

0 comments on commit 6deb9c5

Please sign in to comment.