From 55c0259a71fc6f42f059374da6f001253b188e3d Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 25 Nov 2015 20:04:29 +0100 Subject: [PATCH] Use the first n digit of subsecond instead of discarding it if too big. --- MP42/MP42SubUtilities.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MP42/MP42SubUtilities.m b/MP42/MP42SubUtilities.m index d14bbc9..4dfe257 100644 --- a/MP42/MP42SubUtilities.m +++ b/MP42/MP42SubUtilities.m @@ -257,8 +257,9 @@ unsigned ParseSubTime(const char *time, unsigned secondScale, BOOL hasSign) if (second > 60) { second = 0; } - if (subsecond > secondScale) { - subsecond = 0; + + while (subsecond > secondScale) { + subsecond /= 10; } timeval = hour * 60 * 60 + minute * 60 + second;