From 8ff33f88aba063105d0fc90a24218dfb708904c8 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 11 Nov 2020 11:07:40 +0100 Subject: [PATCH] increase rtmp analyze timeout --- internal/sourcertmp/source.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/sourcertmp/source.go b/internal/sourcertmp/source.go index b5aee9b9..7d27c692 100644 --- a/internal/sourcertmp/source.go +++ b/internal/sourcertmp/source.go @@ -18,7 +18,8 @@ import ( ) const ( - retryPause = 5 * time.Second + retryPause = 5 * time.Second + analyzeTimeout = 8 * time.Second ) // Parent is implemeneted by path.Path. @@ -151,8 +152,7 @@ func (s *Source) runInner() bool { panic(err) } - h264Sps = codec.SPS[0] - h264Pps = codec.PPS[0] + h264Sps, h264Pps = codec.SPS[0], codec.PPS[0] if aacConfig != nil { return @@ -168,7 +168,7 @@ func (s *Source) runInner() bool { } }() - timer := time.NewTimer(5 * time.Second) + timer := time.NewTimer(analyzeTimeout) defer timer.Stop() select {