From db4a3dbc4aa4cdcffb96c67b8f6d4d68c5467933 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 14 Nov 2022 00:32:33 +0100 Subject: Be more tolerant of metadata in WebVTT. --- src/web_vtt_reader.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/web_vtt_reader.cc b/src/web_vtt_reader.cc index 2781654..2e772f1 100644 --- a/src/web_vtt_reader.cc +++ b/src/web_vtt_reader.cc @@ -55,7 +55,7 @@ WebVTTReader::read(std::function ()> get_line) enum class State { /* expecting WEBVTT */ HEADER, - /* awaiting a NOTE or a subtitle timing line */ + /* awaiting a NOTE, some other metadata, or a subtitle timing line */ DATA, /* reading the text of a subtitle */ SUBTITLE, @@ -125,8 +125,6 @@ WebVTTReader::read(std::function ()> get_line) rs.vertical_position.line = 0; state = State::SUBTITLE; - } else if (!line->empty()) { - throw WebVTTError(*line, "a note or time", _context); } break; case State::SUBTITLE: -- cgit v1.2.3