problem description
[AVAssetWriterInput markAsFinished] Cannot call method when status is 0.
the environmental background of the problems and what methods you have tried
po status = 1;
related codes
/ / Please paste the code text below (do not replace the code with pictures)
dispatch_async (self.inputQueue, ^ {
if (writer.status == AVAssetWriterStatusUnknown ||
writer.status == AVAssetWriterStatusCompleted || writer.status == AVAssetWriterStatusFailed || writer.status == AVAssetWriterStatusCancelled) {
DLog(@"asset writer was in an unexpected state (%@)", @(self.status));
return;
} else {
[self.audioInput markAsFinished];
[self.videoInput markAsFinished];
[self.writer endSessionAtSourceTime:self.endTime];
[self.writer finishWritingWithCompletionHandler:^{
self.videoInput = nil;
self.audioInput = nil;
self.writer = nil;
}];
what result do you expect? What is the error message actually seen?
[self.videoInput markAsFinished]; .
:
[AVAssetWriterInput markAsFinished] Cannot call method when status is 0.
(AVAssetWriter*)writer.status = 1;