diff --git a/revid/config.go b/revid/config.go index 701c0753..42ab2b5d 100644 --- a/revid/config.go +++ b/revid/config.go @@ -314,8 +314,9 @@ func (c *Config) Validate() error { if c.RTMPURL == "" { c.Logger.Log(logger.Info, pkg+"no RTMP URL: falling back to HTTP") c.Outputs[i] = HTTP - break + haveRTMPOut = false } + fallthrough case HTTP, RTP: if !haveRTMPOut { c.Bitrate = 0 diff --git a/revid/config_test.go b/revid/config_test.go index 53f81ea9..eb248c93 100644 --- a/revid/config_test.go +++ b/revid/config_test.go @@ -53,7 +53,7 @@ func TestValidate(t *testing.T) { }, }, { - in: Config{Outputs: []uint8{RTMP}, Logger: &dumbLogger{}}, + in: Config{Outputs: []uint8{RTMP}, RTMPURL: "dummURL", Logger: &dumbLogger{}}, check: func(c Config) error { if c.Bitrate != defaultBitrate { return fmt.Errorf("did not get expected bitrate. Got: %v, Want: %v", c.Bitrate, defaultBitrate)