Explorar el Código

emit parser error on empty files

Gil Pedersen hace 13 años
padre
commit
3a03ba082b
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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);
   }