[FFmpeg-cvslog] parseutils: ignore digits below the microsecond.

Nicolas George git at videolan.org
Tue Jul 10 22:44:29 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Tue Jul 10 19:03:12 2012 +0200| [5a9d6993cb331bebd5e760582a1575f49936894f] | committer: Nicolas George

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a9d6993cb331bebd5e760582a1575f49936894f
---

 libavutil/parseutils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 795236c..22c45db 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) {



More information about the ffmpeg-cvslog mailing list