Taking a bunch of go modernize suggestions. (#4194)
This is not all of it as it is not possible (or at least I do not know of a way) to get all suggestions for a repo/project. Did this via loop searching mainly and taking the modernize suggestions.
This commit is contained in:
@@ -1193,7 +1193,7 @@ func (d *DownTrack) WritePaddingRTP(bytesToSend int, paddingOnMute bool, forceMa
|
||||
|
||||
bytesSent := 0
|
||||
payloads := make([]byte, RTPPaddingMaxPayloadSize*len(snts))
|
||||
for i := 0; i < len(snts); i++ {
|
||||
for i := range snts {
|
||||
hdr := RTPHeaderFactory.Get().(*rtp.Header)
|
||||
*hdr = rtp.Header{
|
||||
Version: 2,
|
||||
@@ -1732,7 +1732,7 @@ func (d *DownTrack) writeBlankFrameRTP(duration float32, generation uint32) chan
|
||||
return
|
||||
}
|
||||
|
||||
for i := 0; i < len(snts); i++ {
|
||||
for i := range snts {
|
||||
hdr := &rtp.Header{
|
||||
Version: 2,
|
||||
Padding: false,
|
||||
@@ -2242,7 +2242,7 @@ func (d *DownTrack) WriteProbePackets(bytesToSend int, usePadding bool) int {
|
||||
}
|
||||
|
||||
payloads := make([]byte, RTPPaddingMaxPayloadSize*num)
|
||||
for i := 0; i < num; i++ {
|
||||
for i := range num {
|
||||
rtxExtSequenceNumber := d.rtxSequenceNumber.Inc()
|
||||
hdr := RTPHeaderFactory.Get().(*rtp.Header)
|
||||
*hdr = rtp.Header{
|
||||
|
||||
Reference in New Issue
Block a user