Closed Bug 1165145 Opened 10 years ago Closed 10 years ago

Incorrect MediaSource buffered range being reported in ended mode.

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: jya, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

The MediaSourceReader::GetBuffered() when in ended mode adjust the buffered range so they all end at the same level as the highest end time across source buffer. This is wrong. Only a sourcebuffer is to perform such alignment and across the trackbuffers. (http://w3c.github.io/media-source/index.html#widl-SourceBuffer-buffered) This cause webref mediasource-buffered.html to fail.
We could report time ranges such as [-1 0] as GetEndTime on an empty TimeRanges return -1
Attachment #8606083 - Flags: review?(karlt)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Take "If readyState is ended, then set the end time on the last range in source ranges to highest end time." literally. That is is there s no last range, there s nothing to set.
Attachment #8606085 - Flags: review?(karlt)
Update webref
Attachment #8606086 - Flags: review?(karlt)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7dd9121994e1 got a previous green try, but made some changes up the chain so redoing them just in case.
Attachment #8606085 - Flags: review?(karlt) → review+
Attachment #8606086 - Flags: review?(karlt) → review+
Comment on attachment 8606083 [details] [diff] [review] Part1. Never reports negative time ranges with MSE I had assumed from the commit message that this was meant to remove an existing negative time range, and so it took me a while to work out that this is to prevent adding a (-1,0) time range here because TimeRanges::GetEndTime() returns -1 when there are no ranges, while TrackBuffer::Buffered() returns 0. Can you change the comment to say "don't add a negative time range to empty buffered ranges" or similar, please? An alternative fix, possibly making the code easier to follow would be to make Buffered() return -1, like GetEndTime(). However, I guess this is being rewritten in bug 1163445 anyway.
Attachment #8606083 - Flags: review?(karlt) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: