summaryrefslogtreecommitdiff
path: root/srt2vtt
diff options
context:
space:
mode:
Diffstat (limited to 'srt2vtt')
-rwxr-xr-xsrt2vtt7
1 files changed, 4 insertions, 3 deletions
diff --git a/srt2vtt b/srt2vtt
index 8107e75..a4cb576 100755
--- a/srt2vtt
+++ b/srt2vtt
@@ -66,9 +66,10 @@ two values: the start time and the end time. Valid input looks like
((start end) (parse-time-span (read-line port)))
((lines) (let loop ((lines '()))
(let ((line (read-line port)))
- (if (and (string-null? line)
- ;; A subtitle may be a blank line!
- (not (null? lines)))
+ (if (or (eof-object? line)
+ (and (string-null? line)
+ ;; A subtitle may be a blank line!
+ (not (null? lines))))
lines
(loop (cons line lines)))))))
(make-subtitle id start end lines)))