Fix loop request, ex. camera1: ffmpeg:camera1

This commit is contained in:
Alex X
2024-11-09 18:17:41 +03:00
parent 2c34a17d88
commit 340fd81778
4 changed files with 16 additions and 0 deletions
+3
View File
@@ -188,6 +188,9 @@ func tcpHandler(conn *rtsp.Conn) {
conn.PacketSize = uint16(core.Atoi(s))
}
// will help to protect looping requests to same source
conn.Connection.Source = query.Get("source")
if err := stream.AddConsumer(conn); err != nil {
log.Warn().Err(err).Str("stream", name).Msg("[rtsp]")
return