MSE: Transition from MediaSource::readyState "ended" to "open" can't happen

RESOLVED FIXED in Firefox 36

Status

()

Core
Audio/Video
P2
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks: 1 bug)

Trunk
mozilla38
Points:
---

Firefox Tracking Flags

(firefox36 fixed, firefox37 fixed, firefox38 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
As per spec:
http://w3c.github.io/media-source/#sourcebuffer-prepare-append

"
4.If the readyState attribute of the parent media source is in the "ended" state then run the following steps:

   1.Set the readyState attribute of the parent media source to "open"
   2.Queue a task to fire a simple event named sourceopen at the parent media source .
"

readyState is in the "ended" state if endOfStream() was called.
However, endOfStream() will call SourceBuffer::Ended() which in turns call:
mTrackBuffer->DiscardDecoder() which will clear mCurrentDecoder.

Subsequent calls to SourceBuffer::appendBuffer will fail, as the current decoder in the track buffer has been cleared:

TrackBuffer::AppendDataToCurrentResource(const uint8_t* aData, uint32_t aLength)
{
  MOZ_ASSERT(NS_IsMainThread());
  if (!mCurrentDecoder) {
    return false;
  }

If endOfStream was called without an error; the TrackBuffer's current decoder shouldn't be discarded.
(Assignee)

Comment 1

3 years ago
Created attachment 8547250 [details] [diff] [review]
Re-open SourceBuffer after call to appendBuffer if in ended state

Allow readyState transition from ended to open.
Attachment #8547250 - Flags: review?(cajbir.bugzilla)
(Assignee)

Updated

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

Comment 2

3 years ago
Created attachment 8547457 [details] [diff] [review]
Update w3c web reference tests

Update test results. We won't fail the test anymore
Attachment #8547457 - Flags: review?(cajbir.bugzilla)
(Assignee)

Comment 3

3 years ago
Created attachment 8547481 [details] [diff] [review]
Update w3c web reference tests

Update test results. We won't fail the test anymore
Attachment #8547481 - Flags: review?(cajbir.bugzilla)
(Assignee)

Updated

3 years ago
Attachment #8547457 - Attachment is obsolete: true
Attachment #8547457 - Flags: review?(cajbir.bugzilla)
Priority: -- → P2

Updated

3 years ago
Attachment #8547250 - Flags: review?(cajbir.bugzilla) → review+

Updated

3 years ago
Attachment #8547481 - Flags: review?(cajbir.bugzilla) → review+
(Assignee)

Comment 4

3 years ago
Comment on attachment 8547481 [details] [diff] [review]
Update w3c web reference tests

Actually, this test was required by another fix in bug 1120075
Attachment #8547481 - Attachment is obsolete: true
(Assignee)

Comment 5

3 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/f1d37b792c4a
Comment on attachment 8547250 [details] [diff] [review]
Re-open SourceBuffer after call to appendBuffer if in ended state

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Less consistent testing, sites more likely to use Flash for video.
[Describe test coverage new/current, TBPL]: stable on inbound. presuming green on m-c.
[Risks and why]: MSE-specific, so low.
[String/UUID change made/needed]: None.
Attachment #8547250 - Flags: approval-mozilla-beta?
Attachment #8547250 - Flags: approval-mozilla-aurora?
status-firefox36: --- → affected
status-firefox37: --- → affected
status-firefox38: --- → affected
https://hg.mozilla.org/mozilla-central/rev/f1d37b792c4a
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
status-firefox38: affected → fixed
Attachment #8547250 - Flags: approval-mozilla-beta?
Attachment #8547250 - Flags: approval-mozilla-beta+
Attachment #8547250 - Flags: approval-mozilla-aurora?
Attachment #8547250 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/53345874560b
status-firefox37: affected → fixed
https://hg.mozilla.org/releases/mozilla-beta/rev/7dd701f60492
status-firefox36: affected → fixed
You need to log in before you can comment on or make changes to this bug.