+ {
+ int64_t usecs = 0;
+ if (val) {
+ if ((ret = av_parse_time(&usecs, val, 1)) < 0) {
+ av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\" as duration\n", val);
+ return ret;
+ }
+ }
+ if (usecs < o->min || usecs > o->max) {
+ av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range [%g - %g]\n",
+ usecs / 1000000.0, o->name, o->min / 1000000.0, o->max / 1000000.0);
+ return AVERROR(ERANGE);
+ }
+ *(int64_t *)dst = usecs;