diff --git a/packager/media/formats/webvtt/webvtt_parser.cc b/packager/media/formats/webvtt/webvtt_parser.cc index 71c9dfcc26..2297f6adb1 100644 --- a/packager/media/formats/webvtt/webvtt_parser.cc +++ b/packager/media/formats/webvtt/webvtt_parser.cc @@ -115,7 +115,7 @@ bool WebVttParser::Parse() { << "block size should be 1 but was " << block.size() << "."; return false; } - if (block[0] != "WEBVTT" && block[0] != "\xFE\xFFWEBVTT") { + if (block[0] != "WEBVTT" && block[0] != "\xEF\xBB\xBFWEBVTT") { LOG(ERROR) << "Failed to read WEBVTT header - should be WEBVTT but was " << block[0]; return false; diff --git a/packager/media/formats/webvtt/webvtt_parser_unittest.cc b/packager/media/formats/webvtt/webvtt_parser_unittest.cc index 26a547348e..a25e99bfda 100644 --- a/packager/media/formats/webvtt/webvtt_parser_unittest.cc +++ b/packager/media/formats/webvtt/webvtt_parser_unittest.cc @@ -81,7 +81,7 @@ TEST_F(WebVttParserTest, ParseOnlyHeader) { TEST_F(WebVttParserTest, ParseHeaderWithBOM) { const char* text = - "\xFE\xFFWEBVTT\n" + "\xEF\xBB\xBFWEBVTT\n" "\n"; ASSERT_NO_FATAL_FAILURE(SetUpAndInitializeGraph(text));