diff --git a/cmd/rv/main.go b/cmd/rv/main.go index a3b60d3a..53d145f7 100644 --- a/cmd/rv/main.go +++ b/cmd/rv/main.go @@ -102,6 +102,7 @@ const ( defaultSleepTime = 60 // Seconds profilePath = "rv.prof" pkg = "rv: " + runPreDelay = 20 * time.Second ) // This is set to true if the 'profile' build tag is provided on build. @@ -145,6 +146,12 @@ func main() { if err != nil { log.Log(logger.Fatal, pkg+"could not initialise revid", "error", err.Error()) } + + // NB: Problems were encountered with communicating with RTSP inputs. When trying to + // connect it would fail due to timeout; as if things had not been set up quickly + // enough before revid tried to do things. This delay fixes this, but there is probably + // a better way to solve this problem. + time.Sleep(runPreDelay) log.Log(logger.Debug, "beginning main loop") run(rv, ns, log, netLog)