修复转码进度的bug

This commit is contained in:
bluesea 2024-04-30 15:24:32 +08:00
parent b3f77d8843
commit 49e8adc353

View File

@ -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)