CMSampleBufferRef kCMSampleBufferAttachmentKey_TrimDurationAtStart crash

谁都会走 提交于 2019-12-01 22:41:24

Just like this:

CFDictionaryRef dict = NULL;
if (firstBuffer) {
   firstBuffer = NO;
   dict = CMTimeCopyAsDictionary(CMTimeMake(1024, 44100), kCFAllocatorDefault);
   CMSetAttachment(sampleBuffer, kCMSampleBufferAttachmentKey_TrimDurationAtStart, dict, kCMAttachmentMode_ShouldNotPropagate);
            }
  • According to this thread on Apple Mailing lists I'd suggest you to check on CMAttachment Reference
  • just for clarity, you should rename your `sampleBuffer variable in the inner while
  • did you try to pass a dictionary containing in kCMSampleBufferAttachmentKey_TrimDurationAtStart when initializing your audioReaderOuput ? (not sure how it should be generated
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!