revid/revid.go: use strconv.Atoi rather than strconv.ParseInt(...,10,0) for var handling

Issue #129 resolved
Saxon Milton created an issue

In Revid.update() we process vars and convert them from strings to ints in some cases. We are doing a lot of strconv.ParseInt(….,10,0) when it could just be strconv.Atoi() for example for the Bitrate var:

case "Bitrate":
            v, err := strconv.ParseUint(value, 10, 0)
            if err != nil {
                r.config.Logger.Log(logger.Warning, pkg+"invalid framerate param", "value", value)
                break
            }
            r.config.Bitrate = uint(v)

could be

case "Bitrate":
            v, err := strconv.Atoi(value)
            if err != nil {
                r.config.Logger.Log(logger.Warning, pkg+"invalid framerate param", "value", value)
                break
            }
            r.config.Bitrate = uint(v)

Comments (1)

  1. Log in to comment