diff options
author | Oneric <oneric@oneric.stub> | 2020-06-14 00:33:24 +0200 |
---|---|---|
committer | MrSmile <vabnick@gmail.com> | 2020-06-15 18:56:56 +0300 |
commit | 7959e6172b1eff903284922c03f3fdc98bdc2f05 (patch) | |
tree | 0475ea8cc75621a8951466b02b54700f1e52e375 | |
parent | fb85c9e863ef27c8fcd6ab2dd5f51ced246baadf (diff) | |
download | libass-7959e6172b1eff903284922c03f3fdc98bdc2f05.tar.bz2 libass-7959e6172b1eff903284922c03f3fdc98bdc2f05.tar.xz |
compare: Fix millisecond zero padding
Padding should be 3 digits not 4, otherwise 2252ms are displayed as
'0:00:02.0252' instead of '0:00:02.252'.
-rw-r--r-- | compare/README.md | 8 | ||||
-rw-r--r-- | compare/compare.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compare/README.md b/compare/README.md index 50b1021..eb750aa 100644 --- a/compare/README.md +++ b/compare/README.md @@ -55,11 +55,11 @@ Test program output can look like the following: Loading font 'font1.ttf'. Loading font 'font2.otf'. Processing 'sub1.ass': - Time 0:00:00.0500 - 2.464 BAD - Time 0:00:01.0500 - 1.412 OK - Time 0:00:02.0500 - 4.919 FAIL + Time 0:00:00.500 - 2.464 BAD + Time 0:00:01.500 - 1.412 OK + Time 0:00:02.500 - 4.919 FAIL Processing 'sub2.ass': - Time 0:02:33.0000 - 0.728 OK + Time 0:02:33.000 - 0.728 OK Only 3 of 4 images have passed test ``` For each target image file the program reports a maximal ratio of the per pixel comparison error to the baseline error scale. diff --git a/compare/compare.c b/compare/compare.c index 726e13c..c47429d 100644 --- a/compare/compare.c +++ b/compare/compare.c @@ -304,7 +304,7 @@ static bool process_image(ASS_Renderer *renderer, ASS_Track *track, unsigned msec = tm % 1000; tm /= 1000; unsigned sec = tm % 60; tm /= 60; unsigned min = tm % 60; tm /= 60; - printf(" Time %u:%02u:%02u.%04u - ", (unsigned) tm, min, sec, msec); + printf(" Time %u:%02u:%02u.%03u - ", (unsigned) tm, min, sec, msec); char path[4096]; snprintf(path, sizeof(path), "%s/%s", input, file); |