Be more tolerant of metadata in WebVTT.
[libsub.git] / src / web_vtt_reader.cc
index 2781654bac5b41db37110f8ef0ea9d9a303b6192..2e772f143b99a8e65cdd0de325e500758faf9af3 100644 (file)
@@ -55,7 +55,7 @@ WebVTTReader::read(std::function<optional<string> ()> 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<optional<string> ()> 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: