diff --git a/revid/revid.go b/revid/revid.go index 5b37dc09..9de472e1 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -211,8 +211,8 @@ func (r *Revid) reset(config Config) error { } r.destination = r.destination[:0] - for outNo, outType := range r.config.Outputs { - switch outType { + for _, typ := range r.config.Outputs { + switch typ { case File: s, err := newFileSender(config.OutputFileName) if err != nil { @@ -232,7 +232,7 @@ func (r *Revid) reset(config Config) error { } r.destination = append(r.destination, s) case Http: - r.destination[outNo] = newHttpSender(r.ns, r.config.Logger.Log) + r.destination = append(r.destination, newHttpSender(r.ns, r.config.Logger.Log)) case Udp: s, err := newUdpSender(r.config.RtpAddress, r.config.Logger.Log) if err != nil {