fix webcam init for some cases (#18606)

Co-authored-by: Christian Baars <christianbaars@MacBook-Pro-von-Christian.local>
This commit is contained in:
Christian Baars 2023-05-08 09:57:00 +02:00 committed by GitHub
parent ae6d435aaf
commit cf60e34578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;