Create error on zero-byte poster (#352)

* Error on zero-byte poster

* return cb to stop execution
This commit is contained in:
Evan Miller
2016-04-08 00:25:00 -04:00
committed by Feross Aboukhadijeh
parent 457aca25ee
commit da1e120de9

View File

@@ -64,6 +64,8 @@ function torrentPosterFromVideo (file, torrent, cb) {
server.destroy()
if (buf.length === 0) return cb(new Error('Generated poster contains no data'))
cb(null, buf, '.jpg')
}
}