diff --git a/revid/Config.go b/revid/Config.go index 7a1fd859..809c0803 100644 --- a/revid/Config.go +++ b/revid/Config.go @@ -199,12 +199,12 @@ func (config *Config) Validate(r *revid) error { return errors.New("Bad packetization option defined in config!") } - if fpcAsInt, err := strconv.Atoi(config.FramesPerClip); fpcAsInt > 0 || err != nil { - return errors.New("Bad frames per clip in config!") + if config.FramesPerClip == "" { + r.Log(Warning, "No FramesPerClip defined defined, defaulting to 1!") + config.Width = defaultFramesPerClip } else { - if fpcAsInt == 0 { - r.Log(Warning, "No frames per clip defined, defaulting to 1!") - config.FramesPerClip = defaultFramesPerClip + if integer, err := strconv.Atoi(config.FramesPerClip); integer <= 0 || err != nil { + return errors.New("Bad width defined in config!") } }