mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Silence some warnings. (#4969)
This commit is contained in:
@@ -451,9 +451,6 @@ struct MediaUploadingPreprocessor {
|
||||
|
||||
try? FileManager.default.removeItem(at: outputURL)
|
||||
|
||||
exportSession.outputURL = outputURL
|
||||
exportSession.outputFileType = AVFileType.mp4
|
||||
|
||||
guard exportSession.supportedFileTypes.contains(AVFileType.mp4) else {
|
||||
throw .failedConvertingVideo
|
||||
}
|
||||
@@ -463,9 +460,10 @@ struct MediaUploadingPreprocessor {
|
||||
exportSession.fileLengthLimit = Int64(Double(targetFileSize) * 0.9)
|
||||
}
|
||||
|
||||
await exportSession.export()
|
||||
|
||||
guard exportSession.status == .completed else {
|
||||
do {
|
||||
try await exportSession.export(to: outputURL, as: .mp4)
|
||||
} catch {
|
||||
MXLog.error("Video conversion failed: \(error)")
|
||||
throw .failedConvertingVideo
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user