Incorrect MediaSource buffered range being reported in ended mode.

RESOLVED FIXED in Firefox 41

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks: 1 bug)

Trunk
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(3 attachments)

(Assignee)

Description

4 years ago
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.
(Assignee)

Comment 1

4 years ago
We could report time ranges such as [-1 0] as GetEndTime on an empty TimeRanges return -1
Attachment #8606083 - Flags: review?(karlt)
(Assignee)

Updated

4 years ago
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
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)
(Assignee)

Comment 3

4 years ago
Update webref
Attachment #8606086 - Flags: review?(karlt)
(Assignee)

Comment 4

4 years ago
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+
https://hg.mozilla.org/mozilla-central/rev/4b24663ec60e
https://hg.mozilla.org/mozilla-central/rev/3017514d76f3
https://hg.mozilla.org/mozilla-central/rev/bb3eb37c2e2b
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox41: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.