mirror of
https://github.com/samsonjs/SJSAssetExportSession.git
synced 2026-04-27 14:57:46 +00:00
Code style
This commit is contained in:
parent
83ed881d3e
commit
5c9c5833e5
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue