Fix panic for concurrent streams map read and map write #1612

This commit is contained in:
Alex X
2025-02-24 21:02:33 +03:00
parent e55c2e9598
commit 90544ba713
5 changed files with 45 additions and 28 deletions
+2 -2
View File
@@ -99,11 +99,11 @@ func onvifDeviceService(w http.ResponseWriter, r *http.Request) {
})
case onvif.MediaGetVideoSources:
b = onvif.GetVideoSourcesResponse(streams.GetAll())
b = onvif.GetVideoSourcesResponse(streams.GetAllNames())
case onvif.MediaGetProfiles:
// important for Hass: H264 codec, width, height
b = onvif.GetProfilesResponse(streams.GetAll())
b = onvif.GetProfilesResponse(streams.GetAllNames())
case onvif.MediaGetProfile:
token := onvif.FindTagValue(b, "ProfileToken")