fix for zones which contain multiple properties

This commit is contained in:
Al Beano 2016-07-21 13:36:30 +01:00
parent 65fdeefa7b
commit 68a8969e8d
1 changed files with 9 additions and 6 deletions

View File

@ -27,12 +27,15 @@ function parseZones(zones, base, numframes) {
return null;
}
if (/^crf=/.test(zone[2])) {
var crf = zone[2].replace(/^crf=/, "");
frames.fill(["crf", crf], parseInt(zone[0]), parseInt(zone[1])+1);
} else if (/^b=/.test(zone[2])) {
var b = zone[2].replace(/^b=/, "");
frames.fill(["b", b], parseInt(zone[0]), parseInt(zone[1])+1);
// loop over each part of the zone
for (var j = 2; j < zone.length; j++) {
if (/^crf=/.test(zone[j])) {
var crf = zone[j].replace(/^crf=/, "");
frames.fill(["crf", crf], parseInt(zone[0]), parseInt(zone[1])+1);
} else if (/^b=/.test(zone[j])) {
var b = zone[j].replace(/^b=/, "");
frames.fill(["b", b], parseInt(zone[0]), parseInt(zone[1])+1);
}
}
}