[Bug 26436] New: [MSE] SourceBuffer Monitoring algorithm can cause stall after endOfStream()

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26436

            Bug ID: 26436
           Summary: [MSE] SourceBuffer Monitoring algorithm can cause
                    stall after endOfStream()
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Media Source Extensions
          Assignee: adrianba@microsoft.com
          Reporter: jer.noble@apple.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org

After MediaSource.endOfStream() is called, the duration of the media is
extended to the highest reported buffered range of each SourceBuffer in
MediaSource.sourceBuffers:

"2.4.7 End of stream algorithm"
"3. If error is not set"
"3.1. Run the duration change algorithm with new duration set to the highest
end time reported by the buffered attribute across all SourceBuffer objects in
sourceBuffers."

Also, the buffered ranges returned by HTMLMediaElement.buffered are modified to
include these "virtual" buffered ranges:

"9. HTMLMediaElement Extensions"
"5. For each SourceBuffer object in activeSourceBuffers run the following
steps:"
"5.2. If readyState is "ended", then set the end time on the last range in
source ranges to highest end time."

But the checks in "SourceBuffer Monitoring" use only the original, unmodified
buffered ranges:

"2.4.4 SourceBuffer Monitoring"
"If buffered for at least one object in activeSourceBuffers contains a
TimeRange that ends at the current playback position and does not have a range
covering the time immediately after the current position:"
"1. Set the HTMLMediaElement.readyState attribute to HAVE_CURRENT_DATA."

This causes playback to stall, and will typically occur at the end of a stream,
after endOfStream() is called, when 2 or more SourceBuffers of fractionally
different buffered lengths are active. It is exceedingly unlikely that streams
of different types (audio, video) will have exactly the same duration, due to
the relative sample durations of each media type.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 25 July 2014 18:13:21 UTC