mirror of https://bitbucket.org/ausocean/av.git
audio: codec config validation
This commit is contained in:
parent
95fc69b3c5
commit
d48a11794b
|
@ -189,9 +189,8 @@ func validate(c *Config) error {
|
|||
if c.RecPeriod <= 0 {
|
||||
return fmt.Errorf("invalid recording period: %v", c.RecPeriod)
|
||||
}
|
||||
err := codecutil.Validate(c.Codec)
|
||||
if err != nil {
|
||||
return err
|
||||
if !codecutil.IsValid(c.Codec) {
|
||||
return errors.New("invalid codec")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue