From 49e8adc3535e3c4ef314ca00fc59b1a34ab74d61 Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Tue, 30 Apr 2024 15:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BD=AC=E7=A0=81=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SwiftProject/Project/Util/SpatialVideoConvertor.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SwiftProject/SwiftProject/Project/Util/SpatialVideoConvertor.swift b/SwiftProject/SwiftProject/Project/Util/SpatialVideoConvertor.swift index 24fa39e..b113bfa 100644 --- a/SwiftProject/SwiftProject/Project/Util/SpatialVideoConvertor.swift +++ b/SwiftProject/SwiftProject/Project/Util/SpatialVideoConvertor.swift @@ -139,7 +139,8 @@ class SpatialVideoConvertor { // print( "Added frame at \(time)") // callback with progress - progress?( Float(time.value)/Float(duration.value),false) +// progress?( Float(time.value)/Float(duration.value),false) + progress?( Float(CMTimeGetSeconds(time)/CMTimeGetSeconds(duration)),false) // This sleep is needed to stop memory blooming - keeps around 280Mb rather than spiraling up to 8+Gig! try await Task.sleep(nanoseconds: 3_000_000)