Playback of video never starts

RESOLVED FIXED in Firefox 38

Status

()

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

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks: 1 bug)

Trunk
mozilla38
Points:
---

Firefox Tracking Flags

(firefox37 wontfix, firefox38 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
http://media.junglecode.net/test/mse/

This video never start.

The cause for it is that the moof's atom contains in order:
tfhd
trun
tfdt

as the trun parsing relies on having found a tfdt first, ParseTrun fails.

We shouldn't rely of the atoms being in a specific order, instead we should delay parsing the trun until all depending atoms have been found.
(Assignee)

Comment 1

3 years ago
Created attachment 8564977 [details] [diff] [review]
Postpone parsing TRUN atom until we have all dependent atoms

Postpone parsing trun until we have all dependents.
Attachment #8564977 - Flags: review?(ajones)
(Assignee)

Updated

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

Updated

3 years ago
Blocks: 778617
Comment on attachment 8564977 [details] [diff] [review]
Postpone parsing TRUN atom until we have all dependent atoms

Review of attachment 8564977 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/libstagefright/binding/MoofParser.cpp
@@ +304,5 @@
>          tfdt = Tfdt(box);
> +        if (trun.IsAvailable()) {
> +          // We have a pending trun atom, process it now.
> +          ParseTrun(trun, tfhd, tfdt, aMdhd, aEdts);
> +        }

Suggestioin: It may make for simpler code to iterate twice over the boxes and look for the tfdt the first iteration. That would make it less stateful and probably easier to follow.
Attachment #8564977 - Flags: review?(ajones) → review+
OS: Mac OS X → All
Hardware: x86 → All
(Assignee)

Comment 3

3 years ago
Created attachment 8565152 [details] [diff] [review]
Postpone parsing TRUN atom until we have all dependent atoms

like so?
Attachment #8565152 - Flags: review?(ajones)
(Assignee)

Updated

3 years ago
Attachment #8564977 - Attachment is obsolete: true
Attachment #8565152 - Flags: review?(ajones) → review+
(Assignee)

Comment 4

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9bb4736948d2
https://hg.mozilla.org/mozilla-central/rev/9bb4736948d2
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
This isn't critical for youtube, so we don't need to uplift to 37 unless it becomes a dependency of a later change.
status-firefox37: --- → wontfix
You need to log in before you can comment on or make changes to this bug.