Guard unified player zero frame rate

This commit is contained in:
Stu Leak 2026-01-07 02:01:39 -05:00
parent 19b8343c66
commit 2c75a2fd75

View File

@ -583,7 +583,12 @@ func (p *UnifiedPlayer) startVideoProcess() error {
// Start video frame reading goroutine
go func() {
frameDuration := time.Second / time.Duration(p.frameRate)
rate := p.frameRate
if rate <= 0 {
rate = 24
logging.Debug(logging.CatPlayer, "Frame rate unavailable; defaulting to %.0f fps", rate)
}
frameDuration := time.Second / time.Duration(rate)
frameTime := p.syncClock
for {