AVPlayerItemAccessLogEvents loses track of data transferred

Number:rdar://37259981 Date Originated:2/5/2018
Status:Open Resolved:
Product:iOS/AVFoundation Product Version:11.2.5 (15D60)
Classification:Crash/Hang/Data Loss Reproducible:Sometimes
The sum of AVPlayerItemAccessLogEvent.numberOfBytesTransferred per URI does not always increase.

Steps to Reproduce:
Use the sample project. Allow it to run. It tracks the numberOfBytesTransferred by URI (there can be multiple log events for a given variant URI). It asserts if the aggregate bytes transferred decreases.

Expected Results:
For a given URI, the some of numberOfBytesTransferred field across all events for a given variant URI will either be constant or increasing.

Actual Results:
Sometimes the sum decreases, losing track of numberOfBytesTransferred.

iOS 11.2.5 (15D60)

Model: iPhone 6s Plus


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!