Commit e32f911a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't account failed writes in rate estimator.

parent a2903253
...@@ -463,8 +463,11 @@ func writeLoop(conn *upConnection, track *upTrack, ch <-chan packetIndex) { ...@@ -463,8 +463,11 @@ func writeLoop(conn *upConnection, track *upTrack, ch <-chan packetIndex) {
for _, l := range local { for _, l := range local {
err := l.track.WriteRTP(&packet) err := l.track.WriteRTP(&packet)
if err != nil && err != io.ErrClosedPipe { if err != nil {
log.Printf("%v", err) if err != io.ErrClosedPipe {
log.Printf("WriteRTP: %v", err)
}
continue
} }
l.rate.Add(uint32(bytes)) l.rate.Add(uint32(bytes))
} }
...@@ -917,7 +920,7 @@ func sendRecovery(p *rtcp.TransportLayerNack, track *downTrack) { ...@@ -917,7 +920,7 @@ func sendRecovery(p *rtcp.TransportLayerNack, track *downTrack) {
} }
err = track.track.WriteRTP(&packet) err = track.track.WriteRTP(&packet)
if err != nil { if err != nil {
log.Printf("%v", err) log.Printf("WriteRTP: %v", err)
continue continue
} }
track.rate.Add(uint32(l)) track.rate.Add(uint32(l))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment