Fix send audio to RTSP (cuts out after 30 seconds) #659

This commit is contained in:
Alex X
2023-10-11 13:56:40 +03:00
parent 2e9f3181d4
commit 4d708b5385
+5 -5
View File
@@ -111,12 +111,12 @@ func (c *Conn) Handle() (err error) {
if c.Timeout == 0 {
// polling frames from remote RTSP Server (ex Camera)
if len(c.receivers) > 0 {
// if we receiving video/audio from camera
timeout = time.Second * 5
} else {
timeout = time.Second * 5
if len(c.receivers) == 0 {
// if we only send audio to camera
timeout = time.Second * 30
// https://github.com/AlexxIT/go2rtc/issues/659
timeout += keepaliveDT
}
} else {
timeout = time.Second * time.Duration(c.Timeout)