diff --git a/src/hal/hisi/v4_hal.c b/src/hal/hisi/v4_hal.c index cf854bc..7a2d4df 100644 --- a/src/hal/hisi/v4_hal.c +++ b/src/hal/hisi/v4_hal.c @@ -402,6 +402,7 @@ int v4_region_setbitmap(int handle, hal_bitmap *bitmap) int v4_sensor_config(void) { int fd; v4_snr_dev config; + memset(&config, 0, sizeof(config)); config.device = 0; config.input = v4_config.input_mode; config.rect.width = v4_config.isp.capt.width; diff --git a/src/video.c b/src/video.c index d6dd491..c851de9 100644 --- a/src/video.c +++ b/src/video.c @@ -359,7 +359,7 @@ int start_sdk() { pthread_attr_destroy(&thread_attr); } - if (!access(app_config.sensor_config, 0) ^ sleep(1)) + if (!access(app_config.sensor_config, 0) && sleep(1)) switch (plat) { case HAL_PLATFORM_I6: case HAL_PLATFORM_I6B0: