Add buffer size of 8M to RTSP output in ffmpeg and handle EOF error when accepting RTSP connection in rtsp.go

This commit is contained in:
Sergey Krashevich
2023-03-28 06:54:01 +03:00
parent 222dc6a5c2
commit 693d41be87
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -1,6 +1,11 @@
package rtsp
import (
"io"
"net"
"net/url"
"strings"
"github.com/AlexxIT/go2rtc/cmd/app"
"github.com/AlexxIT/go2rtc/cmd/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
@@ -8,9 +13,6 @@ import (
"github.com/AlexxIT/go2rtc/pkg/rtsp"
"github.com/AlexxIT/go2rtc/pkg/tcp"
"github.com/rs/zerolog"
"net"
"net/url"
"strings"
)
func Init() {
@@ -211,7 +213,9 @@ func tcpHandler(conn *rtsp.Conn) {
})
if err := conn.Accept(); err != nil {
log.Warn().Err(err).Caller().Send()
if err != io.EOF {
log.Warn().Err(err).Caller().Send()
}
if closer != nil {
closer()
}