revid: fix http destination assignment

This commit is contained in:
Dan Kortschak 2019-01-30 13:19:00 +10:30
parent 071e6fd0f7
commit 58102e5587
1 changed files with 3 additions and 3 deletions

View File

@ -211,8 +211,8 @@ func (r *Revid) reset(config Config) error {
} }
r.destination = r.destination[:0] r.destination = r.destination[:0]
for outNo, outType := range r.config.Outputs { for _, typ := range r.config.Outputs {
switch outType { switch typ {
case File: case File:
s, err := newFileSender(config.OutputFileName) s, err := newFileSender(config.OutputFileName)
if err != nil { if err != nil {
@ -232,7 +232,7 @@ func (r *Revid) reset(config Config) error {
} }
r.destination = append(r.destination, s) r.destination = append(r.destination, s)
case Http: 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: case Udp:
s, err := newUdpSender(r.config.RtpAddress, r.config.Logger.Log) s, err := newUdpSender(r.config.RtpAddress, r.config.Logger.Log)
if err != nil { if err != nil {