revid: consider when r.cfg.FileFPS ==0

This commit is contained in:
Saxon 2020-01-25 10:15:27 +10:30
parent 89ca5d6052
commit cfd3f0fc3c
1 changed files with 5 additions and 2 deletions

View File

@ -428,8 +428,11 @@ func (r *Revid) Start() error {
return err
}
// Calculate delay between frames based on InputFPS.
d := time.Duration(1000/r.cfg.FileFPS) * time.Millisecond
// Calculate delay between frames based on FileFPS.
d := time.Duration(0)
if r.cfg.FileFPS != 0 {
d = time.Duration(1000/r.cfg.FileFPS) * time.Millisecond
}
r.wg.Add(1)
go r.processFrom(r.input, d)