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", c.Logger.Log(logger.Info, pkg+"defaulting frames per clip for rtmp out",
"framesPerClip", defaultFramesPerClip) "framesPerClip", defaultFramesPerClip)
c.FramesPerClip = defaultFramesPerClip c.FramesPerClip = defaultFramesPerClip
c.Packetization = Flv
case NothingDefined: case NothingDefined:
c.Logger.Log(logger.Warning, pkg+"no output defined, defaulting", "output", c.Logger.Log(logger.Warning, pkg+"no output defined, defaulting", "output",
defaultOutput) defaultOutput)
c.Outputs[i] = defaultOutput c.Outputs[i] = defaultOutput
c.Packetization = defaultPacketization
fallthrough fallthrough
case Http, Rtp: case Http, Rtp:
c.Logger.Log(logger.Info, pkg+"defaulting frames per clip for http out", c.Logger.Log(logger.Info, pkg+"defaulting frames per clip for http out",
"framesPerClip", httpFramesPerClip) "framesPerClip", httpFramesPerClip)
c.FramesPerClip = httpFramesPerClip c.FramesPerClip = httpFramesPerClip
c.Packetization = Mpegts
default: default:
return errors.New("bad output type defined in config") return errors.New("bad output type defined in config")
} }