清除无效代码
This commit is contained in:
parent
f9cd80af4b
commit
7632ba3312
@ -683,21 +683,12 @@ extension VRVideoTransformController {
|
||||
|
||||
writer.add(writerInput)
|
||||
|
||||
guard let assetExportSession = exportSession as? AVAssetExportSession else {
|
||||
print("Failed to cast export session to AVAssetExportSession")
|
||||
DispatchQueue.main.async {
|
||||
SVProgressHUD.showInfo(withStatus: "视频转码失败")
|
||||
}
|
||||
completion(nil)
|
||||
return
|
||||
}
|
||||
exportSession.videoComposition = AVMutableVideoComposition(propertiesOf: composition)
|
||||
exportSession.outputFileType = AVFileType.mov
|
||||
exportSession.outputURL = outputURL
|
||||
|
||||
assetExportSession.videoComposition = AVMutableVideoComposition(propertiesOf: composition)
|
||||
assetExportSession.outputFileType = AVFileType.mov
|
||||
assetExportSession.outputURL = outputURL
|
||||
|
||||
assetExportSession.exportAsynchronously { [self] in
|
||||
switch assetExportSession.status {
|
||||
exportSession.exportAsynchronously { [self] in
|
||||
switch exportSession.status {
|
||||
case .completed:
|
||||
let exportedAsset = AVAsset(url: outputURL)
|
||||
DispatchQueue.main.async {
|
||||
@ -705,7 +696,7 @@ extension VRVideoTransformController {
|
||||
completion(exportedAsset)
|
||||
}
|
||||
case .failed:
|
||||
if let error = assetExportSession.error {
|
||||
if let error = exportSession.error {
|
||||
print("Export failed with error: \(error.localizedDescription)")
|
||||
DispatchQueue.main.async {
|
||||
SVProgressHUD.showInfo(withStatus: "视频导出失败:\(error.localizedDescription)")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user