summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-09-24 09:35:47 -0700
committerLajos Molnar <lajos@google.com>2013-09-24 10:13:43 -0700
commit283fe37aa20d6f5910ed1c86847c6228e151e1ff (patch)
tree49afa2446b60f1b702443cec28e44d760fa6113b /media
parentdb93e1d79eca52c7ab27b148f55dc0a5a0c771a1 (diff)
downloadframeworks_base-283fe37aa20d6f5910ed1c86847c6228e151e1ff.zip
frameworks_base-283fe37aa20d6f5910ed1c86847c6228e151e1ff.tar.gz
frameworks_base-283fe37aa20d6f5910ed1c86847c6228e151e1ff.tar.bz2
WebVttRenderer: allow BOM at beginning of a WebVTT file.
This is part of the spec. Change-Id: I61ccc259c0b9d3a2bc4273925665d107b0c89c62 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10900755
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/WebVttRenderer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/java/android/media/WebVttRenderer.java b/media/java/android/media/WebVttRenderer.java
index 74773a8..edde68d 100644
--- a/media/java/android/media/WebVttRenderer.java
+++ b/media/java/android/media/WebVttRenderer.java
@@ -690,6 +690,9 @@ class WebVttParser {
final private Phase mParseStart = new Phase() { // 5-9
@Override
public void parse(String line) {
+ if (line.startsWith("\ufeff")) {
+ line = line.substring(1);
+ }
if (!line.equals("WEBVTT") &&
!line.startsWith("WEBVTT ") &&
!line.startsWith("WEBVTT\t")) {