mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
common/omv_csi: Add support for post_process positive value returns.
This commit is contained in:
parent
f84d7dce11
commit
8a26e091c7
@ -1607,11 +1607,11 @@ __weak int omv_csi_snapshot(omv_csi_t *csi, image_t *image, uint32_t flags) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Call the sensor specific post-process.
|
// 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);
|
ret = csi->post_process(csi, image, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret >= 0) {
|
||||||
// Mark this buffer to be released on the next call.
|
// Mark this buffer to be released on the next call.
|
||||||
buffer = framebuffer_acquire(csi->fb, FB_FLAG_USED | FB_FLAG_PEEK);
|
buffer = framebuffer_acquire(csi->fb, FB_FLAG_USED | FB_FLAG_PEEK);
|
||||||
buffer->flags |= VB_FLAG_USED;
|
buffer->flags |= VB_FLAG_USED;
|
||||||
|
Loading…
Reference in New Issue
Block a user