From 071e6fd0f7fe99d530f2f20e8ca241cf79a05587 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Tue, 29 Jan 2019 19:56:02 +1030 Subject: [PATCH] revid: honour difference between rtmp dst and others --- revid/revid.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index a15fab3a..5b37dc09 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -210,7 +210,7 @@ func (r *Revid) reset(config Config) error { } } - r.destination = make([]loadSender, len(r.config.Outputs)) + r.destination = r.destination[:0] for outNo, outType := range r.config.Outputs { switch outType { case File: @@ -218,19 +218,19 @@ func (r *Revid) reset(config Config) error { if err != nil { return err } - r.destination[outNo] = s + r.destination = append(r.destination, s) case FfmpegRtmp: s, err := newFfmpegSender(config.RtmpUrl, fmt.Sprint(r.config.FrameRate)) if err != nil { return err } - r.destination[outNo] = s + r.destination = append(r.destination, s) case Rtmp: s, err := newRtmpSender(config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log) if err != nil { return err } - r.destination[outNo] = s + r.destination = append(r.destination, s) case Http: r.destination[outNo] = newHttpSender(r.ns, r.config.Logger.Log) case Udp: @@ -238,7 +238,7 @@ func (r *Revid) reset(config Config) error { if err != nil { return err } - r.destination[outNo] = s + r.destination = append(r.destination, s) case Rtp: r.rtpSender, err = newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate) if err != nil {