mirror of https://bitbucket.org/ausocean/av.git
revid: fixed quantization and bitrate logic in config.Validate()
This commit is contained in:
parent
cc4d683ba6
commit
be6e168774
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue