From 99df043b5f674a3b0270995a88ac89c4f9ac820f Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 10 Jun 2024 23:27:47 +0200 Subject: [PATCH] Fix Aard pausing/unpausing when not intended --- src/ext/lib/video-transform/Resizer.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.ts b/src/ext/lib/video-transform/Resizer.ts index 7a072f1..199748c 100644 --- a/src/ext/lib/video-transform/Resizer.ts +++ b/src/ext/lib/video-transform/Resizer.ts @@ -328,11 +328,13 @@ class Resizer { // * ar.type is auto, but stretch is set to basic basic stretch // // unpause when using other modes - if (ar.type !== AspectRatioType.Automatic || this.stretcher.mode === StretchType.Basic) { + if ((ar.type !== AspectRatioType.Automatic && ar.type !== AspectRatioType.AutomaticUpdate) || this.stretcher.mode === StretchType.Basic) { this.videoData?.arDetector?.pause(); } else { - if (this.lastAr.type === AspectRatioType.Automatic) { - this.videoData?.arDetector?.unpause(); + if (ar.type !== AspectRatioType.AutomaticUpdate) { + if (this.lastAr.type === AspectRatioType.Automatic || this.lastAr.type === AspectRatioType.AutomaticUpdate) { + this.videoData?.arDetector?.unpause(); + } } } @@ -490,7 +492,6 @@ class Resizer { } } - this.videoAlignment = { x: videoAlignmentX ?? VideoAlignmentType.Default, y: videoAlignmentY ?? VideoAlignmentType.Default