AVSampleBufferDisplayLayer fails to decode with error -8969

I'm writing a player app that will play back HLS live streams, and ran into a curious error when trying to enqueue CMSampleBuffers into an AVSampleBufferDisplayLayer.


What I am doing:

1. Take NALUs from the stream and strip out the SPS, PPS information to construct a CMFormatDescription

2. For VCL type NALUs, replace the starter bytes with a 4-byte length.

3. Wrap the NALUs into CMBlockBuffer

4. Wrap the CMBlockBuffer, along with the CMFormatDescription, into CMSampleBuffers

( What I had done originally:

5. Use a VTDecompressionSession to decompress the CMSampleBuffers into CVImageBuffers

6. Display CVImageBuffers using CAEAGLayer rendering code found here.

)


When I had the player written to use the entire video processing pipeline above (steps #1 through #6), it worked just fine playing HLS live streams. Now, what I'm trying to do now is to enqueue the CMSampleBuffers generated in step #4 directly into an AVSampleBufferDisplay layer to decompress and display (replacing steps #5 and #6).


When I enqueue each CMSampleBuffer, AVSampleBufferDisplayLayerStatus = Rendering, but it also generated a notification that it failed to decode:

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={AVErrorMediaSubTypeKey=(
    1635148593
), NSLocalizedFailureReason=An unknown error occurred (-8969), NSUnderlyingError=0x600000046870 {Error Domain=NSOSStatusErrorDomain Code=-8969 "(null)"}, AVErrorMediaTypeKey=vide, AVErrorPresentationTimeStampKey=CMTime: {642749/90000 = 7.142}, NSLocalizedDescription=The operation could not be completed}


What could cause an error code -11800 / -8969?

I have the exact same problem, thought I didn't now how to subscribe for notifications and didn't get the specific error, my AVSampleBufferDisplayLayer hangs after 1 frame.

How do I registre for notificatiob to get the exact error code?


and - of courese - did anyone solve this??

I am having exactly the same error. Have you solved the problem?

Do any one found this issue. i am having this issue in simulator but not on device.

AVSampleBufferDisplayLayer fails to decode with error -8969
 
 
Q