From 166acad93dac6ddfe3aa71c11b18e07008a0e71b Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Mon, 26 Nov 2018 10:50:49 +0000 Subject: [PATCH] Noop fix to WebvttDecoder We already have tests for comment blocks, and they already pass because we discard the comment when we fail to parse it as a cue. We should just skip it directly, however. --- .../google/android/exoplayer2/text/webvtt/WebvttDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.java index 327428af36..06d3c14970 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.java @@ -110,7 +110,7 @@ public final class WebvttDecoder extends SimpleSubtitleDecoder { foundEvent = EVENT_END_OF_FILE; } else if (STYLE_START.equals(line)) { foundEvent = EVENT_STYLE_BLOCK; - } else if (COMMENT_START.startsWith(line)) { + } else if (line.startsWith(COMMENT_START)) { foundEvent = EVENT_COMMENT; } else { foundEvent = EVENT_CUE;