Seeking in specific files never succeeds when player connected to AVPlayerLayer

Number:rdar://FB7550277 Date Originated:01/24/2020
Status:Open Resolved:
Product:AVFoundation Product Version:Xcode 11.3
Classification:Incorrect/Unexpected Behavior Reproducible:Always
See the sample project and run the unit tests. The same test with one file succeeds and another file fails. 

If you seek the item with the toleranceBefore and toleranceAfter version of the method, the completion closure never gets called. If you seek without those parameters, it always seeks to 0.

This wrong behavior only occurs if the AVPlayer instance is set in an AVPlayerLayer. If you comment out the creation of the AVPlayerLayer in AVItemController.swift:31, both tests will pass.

On files that work, it works as normal. I have reproduced this issue with 2 different files so far. I've included one bad file and one good file in the sample project.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!