Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Initialize 'audio_details' and 'video_details' properties and update codecData documentation #1301

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
'use strict';

var spawn = require('child_process').spawn;
var path = require('path');
var fs = require('fs');
var async = require('async');
var utils = require('./utils');

Expand Down Expand Up @@ -68,6 +66,7 @@ module.exports = function(proto) {
* @param {String} codecData.audio_details input audio codec parameters
* @param {String} codecData.video input video codec name
* @param {String} codecData.video_details input video codec parameters
* @param {String} codecData.duration input video duration
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ var utils = module.exports = {
inInput = codecsObject.inInput = true;
inputIndex = codecsObject.inputIndex = codecsObject.inputIndex + 1;

inputStack[inputIndex] = { format: format[1], audio: '', video: '', duration: '' };
inputStack[inputIndex] = { format: format[1], audio: '', audio_details: '', video: '', video_details: '', duration: '' };
} else if (inInput && (dur = stderrLine.match(durPattern))) {
inputStack[inputIndex].duration = dur[1];
} else if (inInput && (audio = stderrLine.match(audioPattern))) {
Expand Down