Looping a movie infinitely with AV Foundation pauses after random count of loops

Originator:mbinna
Number:rdar://14273700 Date Originated:26-Jun-2013 11:13 AM
Status:Open Resolved:
Product:iPhoneSDK Product Version:6.1
Classification:Other Bug Reproducible:Always
 
Summary:
Looping an MP4 video file infinitely with AVPlayer, AVPlayerItem and AVPlayerLayer pauses the video playback after a random count of loops. I was able to reproduce this issue on iPhone 4 (with iOS 6.1.3). I was not able to reproduce it on iPhone 4S or iPhone 5. I did not try to reproduce it on other devices.

Steps to Reproduce:
1. Configure an AVPlayer with the default option AVPlayerActionAtItemEndPause
2. Observe the AVPlayerItemDidPlayToEndTimeNotification notification
3. In the configured invocation for the notification, call [playerItem seekToTime:kCMTimeZero]; and [player play];

Expected Results:
The movies loops infinitely.

Actual Results:
The movie stops after a random count of loops.

Regression:

Notes:
When using the option AVPlayerActionAtItemEndNone and omitting the call [player play];, the movie loops infinitely without any problems. Please see the attached project. The class FGMMoviePlayerController encapsulates all the AV Foundation logic.

Comments


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!