mirror of https://github.com/calzoneman/sync.git
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",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.65.2",
|
"version": "3.65.3",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -336,7 +336,14 @@ exports.ffprobe = function ffprobe(filename, cb) {
|
||||||
var childErr;
|
var childErr;
|
||||||
var args = ["-show_streams", "-show_format", filename];
|
var args = ["-show_streams", "-show_format", filename];
|
||||||
if (USE_JSON) args = ["-of", "json"].concat(args);
|
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 stdout = "";
|
||||||
var stderr = "";
|
var stderr = "";
|
||||||
var timer = setTimeout(function () {
|
var timer = setTimeout(function () {
|
||||||
|
|
Loading…
Reference in New Issue