Post not yet marked as solved
Post marked as unsolved with 2 replies, 715 views
I'm trying to use the sample code associated to the talk Author fragmented MPEG-4 content with AVAssetWriter which can be found here.
It works well when I run it on macOS, but after adapting it to run in iOS (basically moving the code in the main file to a view controller), it doesn't work. The problem is that the function:
assetWriter(_:didOutputSegmentData:segmentType:segmentReport:)
is never called for the last segment.
In macOS, the last segment is reported after calling the function AVAssetWriter.finishWriting(completionHandler:), but before the completionHandler parameter block is invoked. In iOS, nothing happens at that point.
Is there anything I could do from my side to fix this problem?
Thanks in advance!