Bug 1415821 - Correct the behavior for BADCUE state. r=alwu
authorbechen@mozilla.com <bechen@mozilla.com>
Wed, 15 Nov 2017 17:21:09 +0800
changeset 392185 5a9fbe6806cfa927e1b19c60f0f351ae0e6f7777
parent 392184 1786297a20dfb8cdd1082edc746b9479e78435a1
child 392186 f8dfa355526c007b50aeec918ed4c5f56039362d
push id32915
push useraciure@mozilla.com
push dateFri, 17 Nov 2017 09:57:26 +0000
treeherdermozilla-central@249a8177ad91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalwu
bugs1415821
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415821 - Correct the behavior for BADCUE state. r=alwu MozReview-Commit-ID: G59NBC9rcGa
dom/media/webvtt/vtt.jsm
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -1395,18 +1395,19 @@ const { XPCOMUtils } = require("resource
             }
             if (self.cue.text) {
               self.cue.text += "\n";
             }
             self.cue.text += line;
             break;
           case "BADCUE": // BADCUE
             // 54-62 - Collect and discard the remaining cue.
-            if (!line) {
-              self.state = "ID";
+            self.state = "ID";
+            if (line) { // keep this line to ID state.
+              continue;
             }
             break;
           }
           // The line was already parsed, empty it to ensure we can get the
           // new line in next iteration.
           line = null;
         }
       } catch (e) {