dont fallback to tcp if udp failes

This commit is contained in:
seydx
2025-06-01 18:40:53 +03:00
parent 859cd1cbe6
commit 24ca87e00d
3 changed files with 8 additions and 15 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ func (c *Conn) packetWriter(codec *core.Codec, channel, payloadType uint8) core.
flushBuf := func() {
//log.Printf("[rtsp] channel:%2d write_size:%6d buffer_size:%6d", channel, n, len(buf))
if c.transportMode == TransportUDP {
if c.Transport == "udp" {
if err := c.sendUDPRtpPacket(buf[:n]); err == nil {
c.Send += n
}