From 58102e5587ad7cd1d6fe5f26576d390cad9a8465 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Wed, 30 Jan 2019 13:19:00 +1030 Subject: [PATCH] revid: fix http destination assignment --- revid/revid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {