1

I seem to get this error message randomly after a few cycles of capture:

Error finishing photo: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16802), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x281f20f30 {Error Domain=NSOSStatusErrorDomain Code=-16802 "(null)"}}

Error occurs in:

func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {}

Notes:

  • This Error never comes up on the first capture.
  • The image format is also a processed format: HEIF
  • iOS 13
4

1 回答 1

2

有同样的问题,罪魁祸首是稳定。我在捕获图像时设置了 settings.isAutoStillImageStabilizationEnabled = true 。稳定是一个繁重的过程,它在主线程上阻碍了缓冲区分配。将其移至相机初始化的位置,为我解决了这个问题。

于 2020-03-24T17:12:14.367 回答