parseutils: ignore digits below the microsecond.

Accept 1.1234567 as simply 1.123456 instead of rejecting it.
The rounding is towards 0, which is acceptable and much simpler.
pull/59/head
Nicolas George 13 years ago
parent b27c7d70d8
commit 5a9d6993cb
  1. 2
      libavutil/parseutils.c

@ -610,6 +610,8 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
break;
microseconds += n * (*q - '0');
}
while (isdigit(*q))
q++;
}
if (duration) {

Loading…
Cancel
Save