Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 281431c36b192d11bd39f636fcbe01988ddabde1
      
https://github.com/WebKit/WebKit/commit/281431c36b192d11bd39f636fcbe01988ddabde1
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp

  Log Message:
  -----------
  [Debug] media/media-source/media-source-evict-invalid-time-crash.html is a 
permanent crash
https://bugs.webkit.org/show_bug.cgi?id=319576
rdar://182407431

Reviewed by Youenn Fablet.

315066@main made an incorrect assumption and skip on why 
removeCodedFramesInternal
can be called with an invalid end time.
The test added was skipped on debug when it shouldn't have been.

It is possible for the SourceBuffer's tracks to not overlap, as such the
buffered range after currentTime could be empty. This would have caused
buffered.maximumBufferedTime(); to return MediaTime::invalidTime and would
have caused the problem 315066@main attempted to fix.

We avoid the condition altogether by exiting the loop early if the buffered
intersection is empty, this was likely the primary root cause for 315066@main.

Additionally, we optimised the loop by calculating the intersected range
from the currentTime, so there's no need to skip unnecessarily the segments
prior currentTime later.

Covered by existing tests.

* LayoutTests/TestExpectations:
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::evictFrames):

Canonical link: https://commits.webkit.org/317389@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to