What exactly triggers AVPlayerItemDidPlayToEndTimeNotification?

So.. it turns out that the problem is from the 3rd party stream generator. It had sth ('IV', as in Initialiation Vector) wrong when streaming the TS contents, so at some point AVPlayer read some spot on a TS, then consider the movie is finished, and thus sending AVPlayerItemDidPlayToEndTimeNotification.... Not really an Objective-C issue I guess.

But my question of in what condition does AVPlayer send AVPlayerItemDidPlayToEndTimeNotification is still unknown. If anyone knows any details about this, please feel free to update here. Thanks!