Closed Bug 1120086 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: jya, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

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.
Allow readyState transition from ended to open.
Attachment #8547250 - Flags: review?(cajbir.bugzilla)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Attached patch Update w3c web reference tests (obsolete) — Splinter Review
Update test results. We won't fail the test anymore
Attachment #8547457 - Flags: review?(cajbir.bugzilla)
Attached patch Update w3c web reference tests (obsolete) — Splinter Review
Update test results. We won't fail the test anymore
Attachment #8547481 - Flags: review?(cajbir.bugzilla)
Attachment #8547457 - Attachment is obsolete: true
Attachment #8547457 - Flags: review?(cajbir.bugzilla)
Attachment #8547250 - Flags: review?(cajbir.bugzilla) → review+
Attachment #8547481 - Flags: review?(cajbir.bugzilla) → review+
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
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?
https://hg.mozilla.org/mozilla-central/rev/f1d37b792c4a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Attachment #8547250 - Flags: approval-mozilla-beta?
Attachment #8547250 - Flags: approval-mozilla-beta+
Attachment #8547250 - Flags: approval-mozilla-aurora?
Attachment #8547250 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: