Prevent uncaught exception if spawn() throws synchronously (e.g. ENOMEM)
This commit is contained in:
parent
6b2dfa483c
commit
5a2494adcf
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "3.65.2",
|
||||
"version": "3.65.3",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
|
@ -336,7 +336,14 @@ exports.ffprobe = function ffprobe(filename, cb) {
|
|||
var childErr;
|
||||
var args = ["-show_streams", "-show_format", filename];
|
||||
if (USE_JSON) args = ["-of", "json"].concat(args);
|
||||
var child = spawn(Config.get("ffmpeg.ffprobe-exec"), args);
|
||||
let child;
|
||||
try {
|
||||
child = spawn(Config.get("ffmpeg.ffprobe-exec"), args);
|
||||
} catch (error) {
|
||||
LOGGER.error("Unable to spawn() ffprobe process: %s", error.stack);
|
||||
cb(error);
|
||||
return;
|
||||
}
|
||||
var stdout = "";
|
||||
var stderr = "";
|
||||
var timer = setTimeout(function () {
|
||||
|
|
Loading…
Reference in a new issue