This commit is contained in:
Soph :3 2025-11-24 20:46:11 +02:00
parent 9e5cd110e0
commit ab8b9f5315
2 changed files with 55 additions and 52 deletions

View file

@ -273,7 +273,10 @@ func main() {
}
relay := libipcamera.CreateRTPRelay(applicationContext)
rtspServer, err := rtsp.CreateServer(applicationContext, host, port, relay)
defer rtspServer.Close()
if rtspServer != nil {
defer rtspServer.Close()
}
if err := camera.StartPreviewStream(); err != nil {