From cf60e34578574feb26d9638b79bc1659e92c05b2 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Mon, 8 May 2023 09:57:00 +0200 Subject: [PATCH] fix webcam init for some cases (#18606) Co-authored-by: Christian Baars --- tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino index 59f4e83e6..a8590a4da 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino @@ -135,7 +135,7 @@ struct PICSTORE { #endif // ENABLE_RTSPSERVER struct { - uint8_t up; + uint8_t up = 0; uint16_t width; uint16_t height; uint8_t stream_active; @@ -1456,6 +1456,9 @@ bool Xdrv81(uint32_t function) { case FUNC_PRE_INIT: WcInit(); break; + case FUNC_INIT: + if(Wc.up == 0) WcSetup(Settings->webcam_config.resolution); + break; } return result;