SourceBufferPrivate::evictCodedFrames() loops to evict frames in a unit of 30 seconds from MediaTime::zeroTime() to "currentTime - thirtySeconds". In the case of that currentTime is very large (eg. 180,000,000), evictCodedFrames() loops huge times to complete the eviction process. (in the example, it loops 6,000,000 times.) To make matters worse, the looping process is executed even if there is no MediaSample to be evicted in a track buffer. That is a point which should be improved.
Created attachment 431050 [details] patch
Committed r278728 (238691@main): <https://commits.webkit.org/238691@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431050 [details].
<rdar://problem/79158285>
Thank you for the review.