diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-12 08:55:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-12 08:55:56 +0100 |
commit | 9ecac97be024cf2277872986950d7eec85cbc76e (patch) | |
tree | 1d74fb8aeaca94c7755f772733c97d38d269646c /server/helpers | |
parent | 64e3e27053a5881fa9efca32f5a0debace617ced (diff) | |
download | PeerTube-9ecac97be024cf2277872986950d7eec85cbc76e.tar.gz PeerTube-9ecac97be024cf2277872986950d7eec85cbc76e.tar.zst PeerTube-9ecac97be024cf2277872986950d7eec85cbc76e.zip |
Fix crash regarding video stream issue
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
184 | if (err) return rej(err) | 184 | if (err) return rej(err) |
185 | 185 | ||
186 | const videoStream = metadata.streams.find(s => s.codec_type === 'video') | 186 | const videoStream = metadata.streams.find(s => s.codec_type === 'video') |
187 | if (!videoStream) throw new Error('Cannot find video stream of ' + path) | 187 | if (!videoStream) return rej(new Error('Cannot find video stream of ' + path)) |
188 | 188 | ||
189 | return res(videoStream) | 189 | return res(videoStream) |
190 | }) | 190 | }) |