mirror of https://bitbucket.org/ausocean/av.git
revid/revid.go: break if the given saturation or brightness vars are invalid
This commit is contained in:
parent
21493cf969
commit
7dac9799be
|
@ -433,12 +433,14 @@ func (r *Revid) Update(vars map[string]string) error {
|
||||||
s, err := strconv.ParseInt(value, 10, 0)
|
s, err := strconv.ParseInt(value, 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.config.Logger.Log(logger.Warning, pkg+"invalid saturation param", "value", value)
|
r.config.Logger.Log(logger.Warning, pkg+"invalid saturation param", "value", value)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
r.config.Saturation = int(s)
|
r.config.Saturation = int(s)
|
||||||
case "Brightness":
|
case "Brightness":
|
||||||
b, err := strconv.ParseUint(value, 10, 0)
|
b, err := strconv.ParseUint(value, 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.config.Logger.Log(logger.Warning, pkg+"invalid brightness param", "value", value)
|
r.config.Logger.Log(logger.Warning, pkg+"invalid brightness param", "value", value)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
r.config.Brightness = uint(b)
|
r.config.Brightness = uint(b)
|
||||||
case "Exposure":
|
case "Exposure":
|
||||||
|
|
Loading…
Reference in New Issue