1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00

Add a bit more check for video check dimension #666

This commit is contained in:
Patrik J. Braun 2024-06-28 22:07:10 +02:00
parent 7b7e980ddc
commit 80787dfc0e

View File

@ -86,8 +86,8 @@ export class VideoRendererFactory {
break; break;
} }
} }
if (!width || !height) { if (!width || !height || isNaN(width) || isNaN(height)) {
return reject('[FFmpeg] Can not read video dimension'); return reject(`[FFmpeg] Can not read video dimension. Found: ${{width}}x${{height}}`);
} }
const command: FfmpegCommand = ffmpeg(input.mediaPath); const command: FfmpegCommand = ffmpeg(input.mediaPath);
const fileName = path.basename(input.outPath); const fileName = path.basename(input.outPath);