aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/parseutils.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-10 19:03:12 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-10 22:29:08 +0200
commit5a9d6993cb331bebd5e760582a1575f49936894f (patch)
tree424bf6ad408314ccfad5e915538d30397ea47b05 /libavutil/parseutils.c
parentb27c7d70d8ea6e589d0838f0d2529b99928b7192 (diff)
downloadffmpeg-5a9d6993cb331bebd5e760582a1575f49936894f.tar.gz
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.
Diffstat (limited to 'libavutil/parseutils.c')
-rw-r--r--libavutil/parseutils.c2
1 files changed, 2 insertions, 0 deletions
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) {