Permalink
Browse files

Use test instead of exec in conditionals for testing regex matches.

  • Loading branch information...
1 parent 6521924 commit 1d50e71325c29fe6db82521cb57b298443cb5229 @nickdesaulniers nickdesaulniers committed Nov 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/processor.js
View
@@ -459,9 +459,9 @@ exports = module.exports = function Processor(command) {
if (this.options.video.fpsInput) {
args.push('-r', this.options.video.fpsInput);
}
- if (/^[a-z]+:\/\//.exec(this.options.inputfile)) {
+ if (/^[a-z]+:\/\//.test(this.options.inputfile)) {
args.push('-i', this.options.inputfile.replace(' ', '%20'));
- } else if (/%\d*d/.exec(this.options.inputfile)) { // multi-file format - http://ffmpeg.org/ffmpeg.html#image2-1
+ } else if (/%\d*d/.test(this.options.inputfile)) { // multi-file format - http://ffmpeg.org/ffmpeg.html#image2-1
args.push('-i', this.options.inputfile.replace(' ', '\ '));
} else {
var fstats = fs.statSync(this.options.inputfile);

0 comments on commit 1d50e71

Please sign in to comment.