Post

Replies

Boosts

Views

Activity

finishWritingWithCompletionHandler call error in iOS16.4 and iOS16.5
if (self.assetWriter.status == AVAssetWriterStatusUnknown || self.assetWriter.status == AVAssetWriterStatusCompleted || self.assetWriter.status == AVAssetWriterStatusCancelled || self.assetWriter.status == AVAssetWriterStatusFailed) { }else { [self.assetWriterVideoInput markAsFinished]; [self.assetWriterAudioInput markAsFinished]; [self.assetWriterAudioAppInput markAsFinished]; [self.assetWriter endSessionAtSourceTime:endTime]; } dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); __weak typeof(self)weakSelf = self; [_encoder.assetWriter finishWritingWithCompletionHandler:^{ weakSelf.encoder.assetWriterVideoInput = nil; weakSelf.encoder.assetWriterAudioInput = nil; weakSelf.encoder.assetWriterAudioAppInput = nil; weakSelf.encoder.assetWriter = nil; dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
0
0
473
May ’23
{Error Domain=PHPhotosErrorDomain Code=3305 "(null)"}
When I used BOOL compatible = UIVideoAtPathIsCompatibleWithSavedPhotosAlbum([pathUrl path]); if (compatible) { UISaveVideoAtPathToSavedPhotosAlbum([pathUrl path], self, @selector(savedPhotoImage:didFinishSavingWithError:contextInfo:), nil); } to save video,but here is some error. My phone has 33.72GB available and the video is only 4.2GB in size. What should i do? ps: I try to use [PHPhotoLibrary sharedPhotoLibrary] performChanges to save, but i got the same error. error code -3305.
3
1
3.4k
Apr ’23