我正在使用AVSampleBufferDisplayLayer
解码和显示从服务器流式传输的 H.264 视频。当我的应用程序进入后台然后返回前台时,解码过程被搞砸了并且AVSampleBufferDisplayLayer
失败了。我看到的错误是:
H.264 decoding layer has failed: Error Domain=AVFoundationErrorDomain
Code=-11847 "Operation Interrupted" UserInfo=0x17426c500
{NSUnderlyingError=0x17805fe90 "The operation couldn’t be completed.
(OSStatus error -12084.)",
NSLocalizedRecoverySuggestion=Stop other operations and try again.,
NSLocalizedDescription=Operation Interrupted}
有没有其他人遇到过这样的问题AVSampleBufferDisplayLayer
?这是什么意思?
当我收到错误时,我尝试销毁AVSampleBufferDisplayLayer
并创建一个新的,但随后我开始从 H.264 解码器收到其他错误:
Error Domain=AVFoundationErrorDomain Code=-11821 "Cannot Decode"
UserInfo=0x1740e9700 {AVErrorMediaSubTypeKey=(1635148593),
NSLocalizedFailureReason=The media data could not be decoded. It may be damaged.,
NSUnderlyingError=0x174247680 "The operation couldn’t be completed. (OSStatus error -12909.)",
AVErrorMediaTypeKey=vide,
AVErrorPresentationTimeStampKey=CMTime: {7/30 = 0.233},
NSLocalizedDescription=Cannot Decode}
在失败之前我没有收到任何这些错误AVSampleBufferDisplayLayer
。