Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Cédric Verstraeten
2026-08-07 13:28:38 +02:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent c7c6bcbdf2
commit ba96b63002
+6 -4
View File
@@ -21,11 +21,13 @@ type FrameGate struct {
func (g *FrameGate) Allow(isKeyFrame bool, capturedAtMs int64, now time.Time, maxAge time.Duration) (bool, FrameGateEvent) {
if capturedAtMs > 0 && now.Sub(time.UnixMilli(capturedAtMs)) > maxAge {
event := FrameGateEventNone
if !g.recovering {
event = FrameGateEventLagging
if g.started {
if !g.recovering {
event = FrameGateEventLagging
}
g.started = false
g.recovering = true
}
g.started = false
g.recovering = true
return false, event
}