filter invalid srt blocks
This commit is contained in:
parent
c5534df039
commit
bb8ac55513
1 changed files with 2 additions and 2 deletions
|
@ -212,7 +212,7 @@ Ox.parseSRT = function(string, fps) {
|
|||
var lines = block.split('\n'), points;
|
||||
if (lines.length < 3) {
|
||||
Ox.Log('Core', 'skip invalid srt block', lines);
|
||||
continue;
|
||||
return {};
|
||||
}
|
||||
lines.shift();
|
||||
points = lines.shift().split(' --> ').map(function(point) {
|
||||
|
@ -232,7 +232,7 @@ Ox.parseSRT = function(string, fps) {
|
|||
out: points[1],
|
||||
text: lines.join('\n')
|
||||
};
|
||||
});
|
||||
}).filter(function(block) { return !Ox.isEmpty(block); });
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
Loading…
Reference in a new issue