我正在使用一个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
failed.