mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Decrease keyframe interval when writing to disk.
This commit is contained in:
parent
f53276b89e
commit
ddafca5780
1 changed files with 2 additions and 3 deletions
|
@ -359,10 +359,9 @@ func (t *diskTrack) WriteRTP(packet *rtp.Packet) error {
|
||||||
}
|
}
|
||||||
t.lastKf = ts
|
t.lastKf = ts
|
||||||
} else if t.writer != nil {
|
} else if t.writer != nil {
|
||||||
// Request a keyframe every 10s
|
// Request a keyframe every 4s
|
||||||
delta := ts - t.lastKf
|
delta := ts - t.lastKf
|
||||||
if (delta&0x80000000) == 0 &&
|
if (delta&0x80000000) != 0 || delta > 4*90000 {
|
||||||
delta > 10*90000 {
|
|
||||||
kfNeeded = true
|
kfNeeded = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue