소스 검색

Only disable flash when flashing is enabled

If the flash was disabled and screne flash is used it will try to set
the screen brightness back to the original value. Because the check for
mp_flash_enable and mp_flash_disable is different there's cases where
enable wasn't run but disable is, causing it to use the initial zero
brightness as the restore value.
Martijn Braam 2 년 전
부모
커밋
77a3abf4a6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/io_pipeline.c

+ 1 - 1
src/io_pipeline.c

@@ -575,7 +575,7 @@ on_frame(MPBuffer buffer, void *_data)
                         mp_camera_start_capture(info->camera);
 
                         // Disable flash
-                        if (info->flash) {
+                        if (info->flash && flash_enabled) {
                                 mp_flash_disable(info->flash);
                         }