stream/types: only use nice if parsed processingPriority is a number

for some reason, isNaN(true) -> false, which is technically correct,
but what the fuck...
This commit is contained in:
dumbmoron 2024-07-12 00:01:18 +00:00
parent 2f4e43f78f
commit d68ce2f490
No known key found for this signature in database

View file

@ -25,7 +25,7 @@ function killProcess(p) {
} }
function getCommand(args) { function getCommand(args) {
if (!isNaN(env.processingPriority)) { if (typeof env.processingPriority === 'number' && !isNaN(env.processingPriority)) {
return ['nice', ['-n', env.processingPriority.toString(), ffmpeg, ...args]] return ['nice', ['-n', env.processingPriority.toString(), ffmpeg, ...args]]
} }
return [ffmpeg, args] return [ffmpeg, args]