Deal with reordered keyframes.

This commit is contained in:
Juliusz Chroboczek
2020-10-08 17:58:58 +02:00
parent 69540e23af
commit e07a98e355
4 changed files with 214 additions and 94 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ func readLoop(conn *rtpUpConnection, track *rtpUpTrack) {
first, index := track.cache.Store(
packet.SequenceNumber, packet.Timestamp,
kf, buf[:bytes],
kf, packet.Marker, buf[:bytes],
)
_, rate := track.rate.Estimate()
+1 -1
View File
@@ -209,7 +209,7 @@ func (writer *rtpWriter) add(track conn.DownTrack, add bool, max int) error {
}
func sendKeyframe(track conn.DownTrack, cache *packetcache.Cache) {
_, kf := cache.Keyframe()
_, _, kf := cache.Keyframe()
if len(kf) == 0 {
return
}