Update main.go

This commit is contained in:
Cédric Verstraeten
2025-04-18 14:03:23 +02:00
parent 18af6db00c
commit 5a08d1f3de

View File

@@ -391,7 +391,8 @@ func HandleRequestConfig(mqttClient mqtt.Client, hubKey string, payload models.P
// We need a fix for the width and height if a substream.
// The ROI requires the width and height of the sub stream.
if configuration.Config.Capture.IPCamera.SubRTSP != "" {
if configuration.Config.Capture.IPCamera.SubRTSP != "" &&
configuration.Config.Capture.IPCamera.SubRTSP != configuration.Config.Capture.IPCamera.RTSP {
deepCopy.Capture.IPCamera.Width = configuration.Config.Capture.IPCamera.SubWidth
deepCopy.Capture.IPCamera.Height = configuration.Config.Capture.IPCamera.SubHeight
}