Fix crash regarding video stream issue
This commit is contained in:
parent
64e3e27053
commit
9ecac97be0
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue