filter invalid srt blocks

This commit is contained in:
j 2016-01-03 10:51:39 +05:30
parent c5534df039
commit bb8ac55513

View file

@ -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); });
};
/*@