From 80787dfc0eb8084eb56ede7ee7c8a97763b3dc1d Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Fri, 28 Jun 2024 22:07:10 +0200 Subject: [PATCH] Add a bit more check for video check dimension #666 --- src/backend/model/fileaccess/PhotoWorker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/model/fileaccess/PhotoWorker.ts b/src/backend/model/fileaccess/PhotoWorker.ts index afae0daf..fd8b6f59 100644 --- a/src/backend/model/fileaccess/PhotoWorker.ts +++ b/src/backend/model/fileaccess/PhotoWorker.ts @@ -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);