++p;
}
/* parse timestr as HH:MM:SS */
- q = small_strptime(p, time_fmt[0], &dt);
+ q = av_small_strptime(p, "%J:%M:%S", &dt);
+ if (!q) {
+ /* parse timestr as MM:SS */
+ q = av_small_strptime(p, "%M:%S", &dt);
+ dt.tm_hour = 0;
+ }
if (!q) {
+ char *o;
/* parse timestr as S+ */
- dt.tm_sec = strtol(p, (void *)&q, 10);
- if (q == p) /* the parsing didn't succeed */
+ dt.tm_sec = strtol(p, &o, 10);
- if (o == p) {
- /* the parsing didn't succeed */
- *timeval = INT64_MIN;
++ if (o == p) /* the parsing didn't succeed */
return AVERROR(EINVAL);
- }
dt.tm_min = 0;
dt.tm_hour = 0;
+ q = o;
}
}