From f93a69d4728c950a1f8be5abf94c4943a31afa6d Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Mon, 20 Dec 2021 18:27:36 +0100 Subject: [PATCH] reduce log spam --- mpegts/parser.go | 2 +- srt/server.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mpegts/parser.go b/mpegts/parser.go index 81f6eab..ee4c9a5 100644 --- a/mpegts/parser.go +++ b/mpegts/parser.go @@ -208,7 +208,7 @@ func (p *Parser) ParsePSI(data []byte) (bool, error) { case StreamTypeH264: p.tspMap[elementaryPID] = &ElementaryStream{CodecParser: H264Parser{}} default: - log.Println("Unknown streamtype", elementaryPID) + // log.Println("Unknown streamtype", elementaryPID) } } diff --git a/srt/server.go b/srt/server.go index caabb6d..ec28997 100644 --- a/srt/server.go +++ b/srt/server.go @@ -227,13 +227,13 @@ func (s *ServerImpl) play(conn *srtConn) error { buf, ok := <-sub buffered := len(sub) - if buffered > 144 { + if buffered > cap(sub)/2 { log.Printf("%s - %s - %d packets late in buffer\n", conn.address, conn.streamid.Name(), len(sub)) } // Upstream closed, drop connection if !ok { - log.Println("dropping", conn.address) + log.Printf("%s - %s dropped", conn.address, conn.streamid.Name()) return nil }