Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix crash regarding video stream issue

Chocobozzz9ecac97be024
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 0caa86efcc..c7296054da 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)
})