Fix send audio to RTSP (cuts out after 30 seconds) #659
This commit is contained in:
+5
-5
@@ -111,12 +111,12 @@ func (c *Conn) Handle() (err error) {
|
|||||||
|
|
||||||
if c.Timeout == 0 {
|
if c.Timeout == 0 {
|
||||||
// polling frames from remote RTSP Server (ex Camera)
|
// polling frames from remote RTSP Server (ex Camera)
|
||||||
if len(c.receivers) > 0 {
|
timeout = time.Second * 5
|
||||||
// if we receiving video/audio from camera
|
|
||||||
timeout = time.Second * 5
|
if len(c.receivers) == 0 {
|
||||||
} else {
|
|
||||||
// if we only send audio to camera
|
// if we only send audio to camera
|
||||||
timeout = time.Second * 30
|
// https://github.com/AlexxIT/go2rtc/issues/659
|
||||||
|
timeout += keepaliveDT
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
timeout = time.Second * time.Duration(c.Timeout)
|
timeout = time.Second * time.Duration(c.Timeout)
|
||||||
|
|||||||
Reference in New Issue
Block a user