Deal with reordered keyframes.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user