|
@@ -52,7 +52,7 @@ HlsStreamRecorder.prototype.updateIndex = function(update) {
|
|
|
if (!isNaN(this.startOffset)) {
|
|
if (!isNaN(this.startOffset)) {
|
|
|
var offset = this.startOffset;
|
|
var offset = this.startOffset;
|
|
|
if (offset < 0) offset = Math.min(offset, -3 * this.target_duration);
|
|
if (offset < 0) offset = Math.min(offset, -3 * this.target_duration);
|
|
|
- this.index.start = { offset: offset };
|
|
|
|
|
|
|
+ this.index.start.decimalInteger('offset', offset);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
debug('programs', this.index.programs);
|
|
debug('programs', this.index.programs);
|
|
@@ -121,8 +121,7 @@ HlsStreamRecorder.prototype.process = function(obj, next) {
|
|
|
|
|
|
|
|
// manually set iv if sequence based, since we generate our own sequence numbering
|
|
// manually set iv if sequence based, since we generate our own sequence numbering
|
|
|
if (segment.key && !segment.key.iv) {
|
|
if (segment.key && !segment.key.iv) {
|
|
|
- var seqStr = obj.seq.toString();
|
|
|
|
|
- segment.key.iv = '0x00000000000000000000000000000000'.slice(-seqStr.length) + seqStr;
|
|
|
|
|
|
|
+ segment.key.hexadecimalInteger('iv', obj.seq);
|
|
|
if (this.index.version > 2) {
|
|
if (this.index.version > 2) {
|
|
|
this.index.version = 2;
|
|
this.index.version = 2;
|
|
|
debug('changed index version to:', this.index.version);
|
|
debug('changed index version to:', this.index.version);
|