X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=srt2vtt%2Fsubrip.scm;h=0031db363eafd1a2b5b70774a0f73a4fc757a7f9;hb=HEAD;hp=44f118e8752223e614ad35d437f6203aaea729fc;hpb=0ef9ff4a17cc4a2311dfa8f91ed06eba8730daab;p=srt2vtt.git diff --git a/srt2vtt/subrip.scm b/srt2vtt/subrip.scm index 44f118e..0031db3 100644 --- a/srt2vtt/subrip.scm +++ b/srt2vtt/subrip.scm @@ -32,7 +32,8 @@ element list. Valid input looks like '00:00:03.417'." (let ((match (regexp-exec regexp s))) (if match - (map (cut match:substring match <>) '(1 2 3 4)) + (map (compose string->number (cut match:substring match <>)) + '(1 2 3 4)) (error "Invalid SubRip timestamp: " s)))))) (define parse-time-span @@ -57,7 +58,7 @@ two values: the start time and the end time. Valid input looks like (and (string-null? line) ;; A subtitle may be a blank line! (not (null? lines)))) - lines + (reverse lines) (loop (cons line lines))))))) (make-subtitle id start end lines)))