Browse Source

emit parser error on empty files

Gil Pedersen 13 years ago
parent
commit
3a03ba082b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/m3u8.js

+ 2 - 0
lib/m3u8.js

@@ -117,6 +117,8 @@ function parse(stream, cb) {
   }
 
   function Complete() {
+    if (line_no === 0)
+      return ReportError(new ParserError('No line data', '', -1))
     cleanup();
     cb(null, m3u8);
   }