mirror of
https://github.com/aler9/gortsplib
synced 2025-11-02 19:34:01 +08:00
client: fix reading sources without server ports (bluenviron/mediamtx#4253) (#796)
RTCP packets were sent out to nil addresses, due to the lack of server ports, causing an error.
This commit is contained in:
@@ -67,7 +67,7 @@ func (cf *clientFormat) start() {
|
||||
Period: cf.cm.c.receiverReportPeriod,
|
||||
TimeNow: cf.cm.c.timeNow,
|
||||
WritePacketRTCP: func(pkt rtcp.Packet) {
|
||||
if cf.cm.udpRTPListener != nil {
|
||||
if cf.cm.udpRTPListener != nil && cf.cm.udpRTCPListener.writeAddr != nil {
|
||||
cf.cm.c.WritePacketRTCP(cf.cm.media, pkt) //nolint:errcheck
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user