Silence some warnings. (#4969)

This commit is contained in:
Doug
2026-01-19 15:16:16 +00:00
committed by GitHub
parent a30ae24d16
commit 1faf9125c1
12 changed files with 50 additions and 55 deletions
@@ -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
}