I am trying to create a CMSampleBuffer Ref from the data and trying to feed it to AVAssetWriter. But asset writer is failing to create the movie from the data. Following is the
The operation couldn’t be completed. (AVFoundationErrorDomain error -11800.)
For this error, it always occur when timingInfo is invalid. it need set it to valid values with PTS and Duration.
CMSampleTimingInfo timingInfo = kCMTimingInfoInvalid;
timingInfo.presentationTimeStamp = pts;
timingInfo.duration = duration;