瀏覽代碼

fix bug when no start or end date is specified

Gil Pedersen 12 年之前
父節點
當前提交
59add00fa8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/reader.js

+ 2 - 2
lib/reader.js

@@ -127,8 +127,8 @@ function HlsStreamReader(src, options) {
   this.noData = !!options.noData;
 
   // dates are inclusive
-  this.startDate = new Date(options.startDate);
-  this.stopDate = new Date(options.stopDate);
+  this.startDate = options.startDate ? new Date(options.startDate) : null;
+  this.stopDate = options.stopDate ? new Date(options.stopDate) : null;
 
   this.maxStallTime = options.maxStallTime || Infinity;