[AVMutableVideoCompositionLayerInstruction setCropRectangle:atTime:] causes video being cropped weirdly when played in AVPlayer

Number:rdar://FB9983562 Date Originated:04-14-2022
Status:Open Resolved:
Product:iOS Product Version:15.3
Classification:AVFoundation Reproducible:YES
For certain videos, `- [AVMutableVideoCompositionLayerInstruction setCropRectangle:atTime:];` behaves weirdly.

For example: `[layerInstruction setCropRectangle:CGRectMake(0, 0, assetTrack.naturalSize.width, assetTrack.naturalSize.height) atTime:kCMTimeZero];` could cause half of the content being cropped when the final `AVComposition` is played in an `AVPlayer`.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!