Skip to content

Commit

Permalink
Fixing parser to work with different ffmpeg builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cgiffard committed Nov 20, 2012
1 parent cde0995 commit 62704e2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ffparse.js
Expand Up @@ -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) {
Expand All @@ -168,7 +170,7 @@ FFParser.prototype.parseLine = function(lineData) {

case FF_BUILDINFO:

if (!procedureName === "Input") {
if (procedureName !== "Input") {
break;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 62704e2

Please sign in to comment.