Send non-trivial bitmaps during NACK forwarding.

This commit is contained in:
Juliusz Chroboczek
2020-10-12 14:38:41 +02:00
parent 9f6e23aaf3
commit c8de6620a7
3 changed files with 43 additions and 12 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ func readLoop(conn *rtpUpConnection, track *rtpUpTrack) {
isvideo := track.track.Kind() == webrtc.RTPCodecTypeVideo
codec := track.track.Codec().Name
sendNACK := track.hasRtcpFb("nack", "")
buf := make([]byte, packetcache.BufSize)
var packet rtp.Packet
for {
@@ -87,7 +88,7 @@ func readLoop(conn *rtpUpConnection, track *rtpUpTrack) {
found, first, bitmap := track.cache.BitmapGet(
packet.SequenceNumber - unnacked,
)
if found {
if found && sendNACK {
err := conn.sendNACK(track, first, bitmap)
if err != nil {
log.Printf("%v", err)