From be6e16877430e7e2f33b03d6c81e73d46bfa15e1 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 25 Feb 2019 15:56:51 +1030 Subject: [PATCH] revid: fixed quantization and bitrate logic in config.Validate() --- revid/config.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/revid/config.go b/revid/config.go index b0ba2bc4..6f682028 100644 --- a/revid/config.go +++ b/revid/config.go @@ -148,11 +148,9 @@ func (c *Config) Validate(r *Revid) error { // Configuration really needs to be rethought here. if c.Quantize && c.Quantization == 0 { c.Quantization = defaultQuantization - } else { - c.Bitrate = defaultBitrate } - if (c.Bitrate > 0 && c.Quantization > 0) || (c.Bitrate == 0 && c.Quantization == 0) { + if (c.Bitrate > 0 && c.Quantize) || (c.Bitrate == 0 && !c.Quantize) { return errors.New("bad bitrate and quantization combination for H264 input") }