mirror of https://bitbucket.org/ausocean/av.git
revid: do more thinking about errors in processFrom
This commit is contained in:
parent
e45f51a31f
commit
399ecb8874
|
@ -847,7 +847,12 @@ func (r *Revid) Update(vars map[string]string) error {
|
|||
// processFrom is run as a routine to read from a input data source, lex and
|
||||
// then send individual access units to revid's encoders.
|
||||
func (r *Revid) processFrom(read io.Reader, delay time.Duration) {
|
||||
r.err <- r.lexTo(r.filters[0], read, delay)
|
||||
r.cfg.Logger.Log(logger.Info, pkg+"finished lexing")
|
||||
err := r.lexTo(r.filters[0], read, delay)
|
||||
switch {
|
||||
case err == nil: // Do nothing.
|
||||
case errors.Is(err, io.EOF): // TODO: handle this depending on loop mode.
|
||||
default:
|
||||
r.err <- err
|
||||
}
|
||||
r.wg.Done()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue