Code style

This commit is contained in:
Sami Samhuri 2024-10-04 08:32:56 -07:00
parent 83ed881d3e
commit 5c9c5833e5
No known key found for this signature in database

View file

@ -60,8 +60,11 @@ actor SampleWriter {
) async throws { ) async throws {
precondition(!videoOutputSettings.isEmpty) precondition(!videoOutputSettings.isEmpty)
let duration = let duration = if let timeRange {
if let timeRange { timeRange.duration } else { try await asset.load(.duration) } timeRange.duration
} else {
try await asset.load(.duration)
}
let reader = try AVAssetReader(asset: asset) let reader = try AVAssetReader(asset: asset)
if let timeRange { if let timeRange {
reader.timeRange = timeRange reader.timeRange = timeRange