mirror of
https://github.com/samsonjs/SJSAssetExportSession.git
synced 2026-04-27 14:57:46 +00:00
Use a new task instead of assumeIsolated to try to fix crash on iOS 17
This commit is contained in:
parent
34c374d914
commit
0eefb949e2
1 changed files with 2 additions and 8 deletions
|
|
@ -221,19 +221,13 @@ actor SampleWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
audioInput.requestMediaDataWhenReady(on: queue) {
|
audioInput.requestMediaDataWhenReady(on: queue) {
|
||||||
// NOTE: assumeIsolated crashes on macOS with Swift 6.0, fixed in 6.1
|
Task { await self.writeAllReadySamples() }
|
||||||
self.assumeIsolated { _self in
|
|
||||||
_self.writeAllReadySamples()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func startEncodingVideoTracks() {
|
private func startEncodingVideoTracks() {
|
||||||
videoInput?.requestMediaDataWhenReady(on: queue) {
|
videoInput?.requestMediaDataWhenReady(on: queue) {
|
||||||
// NOTE: assumeIsolated crashes on macOS with Swift 6.0, fixed in 6.1
|
Task { await self.writeAllReadySamples() }
|
||||||
self.assumeIsolated { _self in
|
|
||||||
_self.writeAllReadySamples()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue