Permalink
Browse files

adding support for other (mms, mmsh) network streaming protocols, inc…

…reased accuracy of the regular expression
  • Loading branch information...
1 parent 5e37959 commit 5493d900e8153cd321ff97049c150141689e0ce8 @sergiokas committed Apr 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/processor.js
View
@@ -132,7 +132,7 @@ exports = module.exports = function Processor(command) {
ffmpegProc.on('exit', function(code, signal) {
if (processTimer) clearTimeout(processTimer);
// close file descriptor on outstream
- if(/http/.exec(self.options.inputfile)) {
+ if(/^(http|mms|mmsh):\/\//.exec(self.options.inputfile)) {
callback(code, stderr);
} else {
var cb_ = function() {
@@ -341,7 +341,8 @@ exports = module.exports = function Processor(command) {
if (this.options.inputfile && !this.options.inputstream) {
try
{
- if(/http/.exec(this.options.inputfile)) {
+ // Check if it's a network streaming url.
+ if(/^(http|mms|mmsh):\/\//.exec(this.options.inputfile)) {
args.push('-i', this.options.inputfile.replace(' ', '%20'));
} else {
var fstats = fs.statSync(this.options.inputfile);

0 comments on commit 5493d90

Please sign in to comment.