Skip to content

Commit

Permalink
Fix send audio to RTSP (cuts out after 30 seconds) AlexxIT#659
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Oct 11, 2023
1 parent 2e9f318 commit 4d708b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/rtsp/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4d708b5

Please sign in to comment.