revid: defaulting to Mpegts packetization if output is Http or Rtp and Defaulting to Flv packetization if output is Rtmp

This commit is contained in:
Saxon 2019-02-25 18:26:20 +10:30
parent c247e63bd0
commit 2818f308df
1 changed files with 3 additions and 0 deletions

View File

@ -186,15 +186,18 @@ func (c *Config) Validate(r *Revid) error {
c.Logger.Log(logger.Info, pkg+"defaulting frames per clip for rtmp out",
"framesPerClip", defaultFramesPerClip)
c.FramesPerClip = defaultFramesPerClip
c.Packetization = Flv
case NothingDefined:
c.Logger.Log(logger.Warning, pkg+"no output defined, defaulting", "output",
defaultOutput)
c.Outputs[i] = defaultOutput
c.Packetization = defaultPacketization
fallthrough
case Http, Rtp:
c.Logger.Log(logger.Info, pkg+"defaulting frames per clip for http out",
"framesPerClip", httpFramesPerClip)
c.FramesPerClip = httpFramesPerClip
c.Packetization = Mpegts
default:
return errors.New("bad output type defined in config")
}