From 9ecac97be024cf2277872986950d7eec85cbc76e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Dec 2018 08:55:56 +0100 Subject: [PATCH] Fix crash regarding video stream issue --- server/helpers/ffmpeg-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 0caa86efc..c7296054d 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -184,7 +184,7 @@ function getVideoFileStream (path: string) { if (err) return rej(err) const videoStream = metadata.streams.find(s => s.codec_type === 'video') - if (!videoStream) throw new Error('Cannot find video stream of ' + path) + if (!videoStream) return rej(new Error('Cannot find video stream of ' + path)) return res(videoStream) }) -- 2.25.1