summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-02-15 13:55:01 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-02-15 14:33:38 -0500
commitc86f914e2fe21db708d5c17c62df657f66628cbd (patch)
tree95aa77ee6658c5841fd6f15a64af071a8e5f9513
parent91c6e7263b217d873ce86173340d487e401a3296 (diff)
webvtt: Fix WebVTT timestamps.
* srt2vtt/webvtt.scm (write-time): Format time components with correct number of digits.
-rw-r--r--srt2vtt/webvtt.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/srt2vtt/webvtt.scm b/srt2vtt/webvtt.scm
index f4cd91b..046a5e7 100644
--- a/srt2vtt/webvtt.scm
+++ b/srt2vtt/webvtt.scm
@@ -27,7 +27,7 @@
"Write TIME as a WebVTT formatted timestamp to PORT."
(match time
((h m s ms)
- (format port "~a:~a:~a.~a" h m s ms))))
+ (format port "~2,'0d:~2,'0d:~2,'0d.~3,'0d" h m s ms))))
(define (write-webvtt subtitle port)
"Write SUBTITLE as a WebVTT formatted subtitle to PORT."