add timeouts

This commit is contained in:
Cedric Verstraeten
2023-11-19 21:35:52 +01:00
parent 71c50bf9eb
commit 474f81bfc4

View File

@@ -119,6 +119,8 @@ func DialTimeout(uri string, timeout time.Duration) (self *Client, err error) {
DebugRtsp: DebugRtsp,
SkipErrRtpBlock: SkipErrRtpBlock,
RtpKeepAliveTimeout: 10 * time.Second,
RtspTimeout: 10 * time.Second,
RtpTimeout: 10 * time.Second,
}
return
}
@@ -1340,7 +1342,7 @@ func (self *Client) Write(buffer []byte, channel int, time uint32) (err error) {
PayloadType: 0, //packet.PayloadType, // will be owerwriten
SequenceNumber: self.sequenceNumber,
Timestamp: time,
SSRC: 1293847657, //packet.SSRC,
SSRC: 1293847657,
},
Payload: buffer, // Find a way to send consistent audio buffer!
}