1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Decrease keyframe interval when writing to disk.

This commit is contained in:
Juliusz Chroboczek 2021-01-03 13:45:46 +01:00
parent f53276b89e
commit ddafca5780

View file

@ -359,10 +359,9 @@ func (t *diskTrack) WriteRTP(packet *rtp.Packet) error {
}
t.lastKf = ts
} else if t.writer != nil {
// Request a keyframe every 10s
// Request a keyframe every 4s
delta := ts - t.lastKf
if (delta&0x80000000) == 0 &&
delta > 10*90000 {
if (delta&0x80000000) != 0 || delta > 4*90000 {
kfNeeded = true
}
}