mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-21 01:22:08 +02:00
Add a bit more check for video check dimension #666
This commit is contained in:
parent
7b7e980ddc
commit
80787dfc0e
@ -86,8 +86,8 @@ export class VideoRendererFactory {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!width || !height) {
|
||||
return reject('[FFmpeg] Can not read video dimension');
|
||||
if (!width || !height || isNaN(width) || isNaN(height)) {
|
||||
return reject(`[FFmpeg] Can not read video dimension. Found: ${{width}}x${{height}}`);
|
||||
}
|
||||
const command: FfmpegCommand = ffmpeg(input.mediaPath);
|
||||
const fileName = path.basename(input.outPath);
|
||||
|
Loading…
Reference in New Issue
Block a user