mirror of
https://github.com/androidx/media.git
synced 2025-05-11 17:49:52 +08:00
Merge pull request #776 from IanDBird/srt-fix
Ignore extra returns in Subrip parsing
This commit is contained in:
commit
e13e23e3e0
@ -58,6 +58,10 @@ public final class SubripParser implements SubtitleParser {
|
|||||||
String currentLine;
|
String currentLine;
|
||||||
|
|
||||||
while ((currentLine = reader.readLine()) != null) {
|
while ((currentLine = reader.readLine()) != null) {
|
||||||
|
// Skip blank lines.
|
||||||
|
if (currentLine.length() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Parse the numeric counter as a sanity check.
|
// Parse the numeric counter as a sanity check.
|
||||||
try {
|
try {
|
||||||
Integer.parseInt(currentLine);
|
Integer.parseInt(currentLine);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user