Creating CMSampleBufferRef from the data

前端 未结 2 1961
故里飘歌
故里飘歌 2021-02-04 16:06

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

2条回答
  •  孤街浪徒
    2021-02-04 17:03

        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;
    

提交回复
热议问题