| Summary: |
[MSE] Assertion if attempting to perform eviction before an init segment was appended |
| Product: |
WebKit
|
Reporter: |
Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: |
Media | Assignee: |
Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
Normal
|
CC: |
calvaris, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer
|
| Priority: |
P2
|
Keywords: |
InRadar, Regression |
| Version: |
WebKit Nightly Build | |
|
| Hardware: |
Unspecified | |
|
| OS: |
Unspecified | |
|
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=225800
|
| Attachments: |
| Description |
Flags |
|
Patch
|
none
|
|
Seen while browsing the SourceBufferPrivate::evictCodedFrames code. In SourceBufferPrivate::evictCodedFrames we have: ``` // NOTE: begin by removing data from the beginning of the buffered ranges, 30 seconds at // a time, up to 30 seconds before currentTime. MediaTime thirtySeconds = MediaTime(30, 1); MediaTime maximumRangeEnd = currentTime - thirtySeconds; #if !RELEASE_LOG_DISABLED uint64_t initialBufferedSize = totalTrackBufferSizeInBytes(); DEBUG_LOG(LOGIDENTIFIER, "currentTime = ", currentTime, ", require ", initialBufferedSize + newDataSize, " bytes, maximum buffer size is ", maximumBufferSize); #endif MediaTime rangeStart = MediaTime::zeroTime(); MediaTime rangeEnd = rangeStart + thirtySeconds; while (rangeStart < maximumRangeEnd) { // 4. For each range in removal ranges, run the coded frame removal algorithm with start and // end equal to the removal range start and end timestamp respectively. removeCodedFrames(rangeStart, std::min(rangeEnd, maximumRangeEnd), currentTime, isEnded); if (!isBufferFullFor(newDataSize, maximumBufferSize)) { break; } rangeStart += thirtySeconds; rangeEnd += thirtySeconds; } ``` removeCodedFrames will immediately assert that `ASSERT(start < end);` if we haven't started playback, or currentTime = 0 MediaTime maximumRangeEnd = currentTime - thirtySeconds = -30s MediaTime rangeStart = MediaTime::zeroTime() = 0s MediaTime rangeEnd = rangeStart + thirtySeconds = 30s so: removeCodedFrames(rangeStart, std::min(rangeEnd, maximumRangeEnd), currentTime, isEnded); is called with rangeState = 0 std::min(rangeEnd, maximumRangeEnd) = -30s which will assert.