int ff_parse_sample_rate(unsigned *ret, const char *arg, void *log_ctx)

{

    char *tail;

    double srate = av_strtod(arg, &tail);

    if (*tail || srate < 1 || (int)srate != srate) {

        av_log(log_ctx, AV_LOG_ERROR, "Invalid sample rate '%s'\n", arg);

        return AVERROR(EINVAL);

    }

    *ret = srate;

    return 0;

}

int ff_parse_sample_rate(unsigned *ret, const char *arg, void *log_ctx)

{

    char *tail;

    double srate = av_strtod(arg, &tail);

    if (*tail || srate < 1 || (int)srate != srate) {

        av_log(log_ctx, AV_LOG_ERROR, "Invalid sample rate '%s'\n", arg);

        return AVERROR(EINVAL);

    }

    *ret = srate;

    return 0;

}

int FUNC_0(unsigned *VAR_0, const char *VAR_1, void *VAR_2)

{

    char *VAR_3;

    double VAR_4 = av_strtod(VAR_1, &VAR_3);

    if (*VAR_3 || VAR_4 < 1 || (int)VAR_4 != VAR_4) {

        av_log(VAR_2, AV_LOG_ERROR, "Invalid sample rate '%s'\n", VAR_1);

        return AVERROR(EINVAL);

    }

    *VAR_0 = VAR_4;

    return 0;

}

int FUNC_0(unsigned *VAR_0, const char *VAR_1, void *VAR_2)
{ char *VAR_3; double VAR_4 = av_strtod(VAR_1, &VAR_3); if (*VAR_3 || VAR_4 < 1 || (int)VAR_4 != VAR_4) { av_log(VAR_2, AV_LOG_ERROR, "Invalid sample rate '%s'\n", VAR_1); return AVERROR(EINVAL); } *VAR_0 = VAR_4; return 0; }