diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-10 19:03:12 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-10 22:29:08 +0200 |
commit | 5a9d6993cb331bebd5e760582a1575f49936894f (patch) | |
tree | 424bf6ad408314ccfad5e915538d30397ea47b05 /libavutil/parseutils.c | |
parent | b27c7d70d8ea6e589d0838f0d2529b99928b7192 (diff) | |
download | ffmpeg-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.c | 2 |
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) { |