revid/revid.go: defer r.wg.Done() in revid.outputClips routine

This commit is contained in:
saxon 2019-02-05 10:50:21 +10:30
parent a4d179039b
commit de4f471201
1 changed files with 1 additions and 1 deletions

View File

@ -495,6 +495,7 @@ func (r *Revid) Update(vars map[string]string) error {
// outputClips takes the clips produced in the packClips method and outputs them
// to the desired output defined in the revid config
func (r *Revid) outputClips() {
defer r.wg.Done()
lastTime := time.Now()
var count int
loop:
@ -583,7 +584,6 @@ loop:
r.config.Logger.Log(logger.Error, pkg+"failed to close output"+strconv.Itoa(i)+" destination", "error", err.Error())
}
}
r.wg.Done()
}
// startRaspivid sets up things for input from raspivid i.e. starts