From: Chocobozzz Date: Wed, 12 Dec 2018 07:55:56 +0000 (+0100) Subject: Fix crash regarding video stream issue X-Git-Tag: v1.2.0-rc.1~75 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ecac97be024cf2277872986950d7eec85cbc76e;p=oweals%2Fpeertube.git Fix crash regarding video stream issue --- 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) })