diff --git a/Sources/SJSAssetExportSession/SampleWriter.swift b/Sources/SJSAssetExportSession/SampleWriter.swift index 32095fe..191dff6 100644 --- a/Sources/SJSAssetExportSession/SampleWriter.swift +++ b/Sources/SJSAssetExportSession/SampleWriter.swift @@ -60,8 +60,11 @@ actor SampleWriter { ) async throws { precondition(!videoOutputSettings.isEmpty) - let duration = - if let timeRange { timeRange.duration } else { try await asset.load(.duration) } + let duration = if let timeRange { + timeRange.duration + } else { + try await asset.load(.duration) + } let reader = try AVAssetReader(asset: asset) if let timeRange { reader.timeRange = timeRange