webrtc: discard empty RTP packets coming from Chrome (#1804)

This commit is contained in:
Alessandro Ros 2023-05-16 17:29:20 +02:00 committed by GitHub
parent 418d987a86
commit 2686c7b04b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,11 @@ func (t *webRTCIncomingTrack) start(stream *stream) {
return
}
// sometimes Chrome sends empty RTP packets. ignore them.
if len(pkt.Payload) == 0 {
continue
}
stream.writeRTPPacket(t.media, t.format, pkt, time.Now())
}
}()