File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ esp_err_t cam_deinit(void)
435
435
}
436
436
437
437
ll_cam_deinit (cam_obj );
438
-
438
+
439
439
if (cam_obj -> dma ) {
440
440
free (cam_obj -> dma );
441
441
}
@@ -484,7 +484,11 @@ camera_fb_t *cam_take(TickType_t timeout)
484
484
} else {
485
485
ESP_LOGW (TAG , "NO-EOI" );
486
486
cam_give (dma_buffer );
487
- return cam_take (timeout - (xTaskGetTickCount () - start ));//recurse!!!!
487
+ TickType_t ticks_spent = xTaskGetTickCount () - start ;
488
+ if (ticks_spent >= timeout ) {
489
+ return NULL ; /* We are out of time */
490
+ }
491
+ return cam_take (timeout - ticks_spent );//recurse!!!!
488
492
}
489
493
} else if (cam_obj -> psram_mode && cam_obj -> in_bytes_per_pixel != cam_obj -> fb_bytes_per_pixel ){
490
494
//currently this is used only for YUV to GRAYSCALE
You can’t perform that action at this time.
0 commit comments