Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
54d207f3
authored
Jun 18, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Default caption parsers to non-strict parsing.
parent
39adcabf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
library/src/main/java/com/google/android/exoplayer/text/ttml/TtmlParser.java
library/src/main/java/com/google/android/exoplayer/text/webvtt/WebvttParser.java
library/src/main/java/com/google/android/exoplayer/text/ttml/TtmlParser.java
View file @
54d207f3
...
@@ -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(
tru
e)}.
* Equivalent to {@code TtmlParser(
fals
e)}.
*/
*/
public
TtmlParser
()
{
public
TtmlParser
()
{
this
(
tru
e
);
this
(
fals
e
);
}
}
/**
/**
* @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.
*/
*/
...
...
library/src/main/java/com/google/android/exoplayer/text/webvtt/WebvttParser.java
View file @
54d207f3
...
@@ -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
(
tru
e
);
this
(
fals
e
);
}
}
/**
* @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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment