revid: simplify

This commit is contained in:
Trek H 2020-08-14 12:34:20 +09:30
parent 6ecce76602
commit 7cf449b5c9
1 changed files with 1 additions and 3 deletions

View File

@ -459,11 +459,9 @@ func (r *Revid) Start() error {
// between recording periods for audio. // between recording periods for audio.
d := time.Duration(0) d := time.Duration(0)
if r.cfg.Input == config.InputAudio { if r.cfg.Input == config.InputAudio {
if r.cfg.RecPeriod != 0 {
d = time.Duration(r.cfg.RecPeriod * float64(time.Second)) d = time.Duration(r.cfg.RecPeriod * float64(time.Second))
} }
} else { } else if r.cfg.FileFPS != 0 {
if r.cfg.FileFPS != 0 {
d = time.Duration(1000/r.cfg.FileFPS) * time.Millisecond d = time.Duration(1000/r.cfg.FileFPS) * time.Millisecond
} }
} }