common/omv_csi: Add support for post_process positive value returns.

This commit is contained in:
Kwabena W. Agyeman 2025-08-09 09:51:42 -07:00
parent f84d7dce11
commit 8a26e091c7

View File

@ -1607,11 +1607,11 @@ __weak int omv_csi_snapshot(omv_csi_t *csi, image_t *image, uint32_t flags) {
#endif
// Call the sensor specific post-process.
if (ret == 0 && csi->post_process && !(flags & OMV_CSI_FLAG_NO_POST)) {
if (ret >= 0 && csi->post_process && !(flags & OMV_CSI_FLAG_NO_POST)) {
ret = csi->post_process(csi, image, flags);
}
if (ret == 0) {
if (ret >= 0) {
// Mark this buffer to be released on the next call.
buffer = framebuffer_acquire(csi->fb, FB_FLAG_USED | FB_FLAG_PEEK);
buffer->flags |= VB_FLAG_USED;