diff --git a/revid/revid.go b/revid/revid.go index 8c4b57ed..02656d03 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -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