From 5a9d6993cb331bebd5e760582a1575f49936894f Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Tue, 10 Jul 2012 19:03:12 +0200 Subject: 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. --- libavutil/parseutils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavutil/parseutils.c') diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 795236cfc2..22c45dbac5 100644 --- a/libavutil/parseutils.c +++ b/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) { -- cgit v1.2.3