From f554030f3c4657e5ad6a1110dd5a5cc70d63fa15 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Tue, 29 Dec 2020 20:20:00 +0100 Subject: [PATCH] Don't set AR if video dimensions are undefined. --- src/ext/lib/video-transform/Resizer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 3e0bc2c..7a5ec8f 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -144,6 +144,10 @@ class Resizer { if (this.destroyed) { return; } + + if (!this.video.videoWidth || !this.video.videoHeight) { + this.logger.log('warning', 'debug', '[Resizer::setAr] Video has no width or no height. This is not allowed. Aspect ratio will not be set.'); + } this.logger.log('info', 'debug', '[Resizer::setAr] trying to set ar. New ar:', ar)