当我想通过使用 VTCompressionSessionCreate 创建 VTCompressionSessionRef 时,这是崩溃,谁能告诉我为什么??????
dispatch_sync(aQueue, ^{
// Create the compression session
OSStatus status = VTCompressionSessionCreate(NULL, width, height, kCMVideoCodecType_H264, NULL, NULL, NULL, didCompressH264, (__bridge void *)(self), &EncodingSession);
NSLog(@"H264: VTCompressionSessionCreate %d", (int)status);
if (status != 0)
{
NSLog(@"H264: Unable to create a H264 session");
error = @"H264: Unable to create a H264 session";
return ;
}
}
崩溃时状态始终为-12912。