Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Unified Diff: Source/core/html/track/WebVTTParser.cpp

Issue 55853002: Handle empty lines in the 'TimingsAndSettings' state in the WebVTTParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTParser.cpp
diff --git a/Source/core/html/track/WebVTTParser.cpp b/Source/core/html/track/WebVTTParser.cpp
index 32d0bbe90e08fc1bee88d55c93e3cb4a9f67f03c..c0b9283c4b42fe682985135150996462fe5e2d3a 100644
--- a/Source/core/html/track/WebVTTParser.cpp
+++ b/Source/core/html/track/WebVTTParser.cpp
@@ -180,6 +180,11 @@ void WebVTTParser::parseBytes(const char* data, unsigned length)
break;
case TimingsAndSettings:
+ if (line.isEmpty()) {
+ m_state = Id;
+ break;
+ }
+
// 40 - Collect cue timings and settings.
m_state = collectTimingsAndSettings(line);
break;
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698