Commit 54d207f3 by Oliver Woodman

Default caption parsers to non-strict parsing.

parent 39adcabf
...@@ -77,15 +77,15 @@ public class TtmlParser implements SubtitleParser { ...@@ -77,15 +77,15 @@ public class TtmlParser implements SubtitleParser {
private final boolean strictParsing; private final boolean strictParsing;
/** /**
* Equivalent to {@code TtmlParser(true)}. * Equivalent to {@code TtmlParser(false)}.
*/ */
public TtmlParser() { public TtmlParser() {
this(true); this(false);
} }
/** /**
* @param strictParsing If true, {@link #parse(InputStream, String, long)} will throw a * @param strictParsing If true, {@link #parse(InputStream, String, long)} will throw a
* {@link ParserException} if the stream contains invalid ttml. If false, the parser will * {@link ParserException} if the stream contains invalid data. If false, the parser will
* make a best effort to ignore minor errors in the stream. Note however that a * make a best effort to ignore minor errors in the stream. Note however that a
* {@link ParserException} will still be thrown when this is not possible. * {@link ParserException} will still be thrown when this is not possible.
*/ */
......
...@@ -68,13 +68,21 @@ public class WebvttParser implements SubtitleParser { ...@@ -68,13 +68,21 @@ public class WebvttParser implements SubtitleParser {
private final boolean strictParsing; private final boolean strictParsing;
/**
* Equivalent to {@code WebvttParser(false)}.
*/
public WebvttParser() { public WebvttParser() {
this(true); this(false);
} }
/**
* @param strictParsing If true, {@link #parse(InputStream, String, long)} will throw a
* {@link ParserException} if the stream contains invalid data. If false, the parser will
* make a best effort to ignore minor errors in the stream. Note however that a
* {@link ParserException} will still be thrown when this is not possible.
*/
public WebvttParser(boolean strictParsing) { public WebvttParser(boolean strictParsing) {
this.strictParsing = strictParsing; this.strictParsing = strictParsing;
textBuilder = new StringBuilder(); textBuilder = new StringBuilder();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment