Permalink
Browse files

Fixing parser to work with different ffmpeg builds

  • Loading branch information...
1 parent cde0995 commit 62704e2ff37109a787d8561296652e33fd226f4c @cgiffard committed Nov 20, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 ffparse.js
View
@@ -144,7 +144,9 @@ FFParser.prototype.parseLine = function(lineData) {
lineData.match(/\:/g)) {
procedureName = procedureData[1];
- lineData = lineData.substr(procedureName.length);
+
+ if (self.status > FF_BUILDINFO)
+ lineData = lineData.substr(procedureName.length);
}
if (indentation < self._previousIndentation) {
@@ -168,7 +170,7 @@ FFParser.prototype.parseLine = function(lineData) {
case FF_BUILDINFO:
- if (!procedureName === "Input") {
+ if (procedureName !== "Input") {
break;
}
@@ -365,7 +367,7 @@ function FFStream(initData) {
self.metadata = {};
var initParts =
- initData.match(/\s*#\d:(\d+)(\(([a-zA-Z\-]+)\))\:\s*(Video|Audio)\s*:\s*(.*)/);
+ initData.match(/\s*#\d[:\.](\d+)(\(([a-zA-Z\-]+)\))\:\s*(Video|Audio)\s*:\s*(.*)/);
if (!initParts) {
// console.log(initData);

0 comments on commit 62704e2

Please sign in to comment.