High CPU usage when hitting end of MSE content where endOfStream wasn't called

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
4 years ago
4 years ago

People

(Reporter: jya, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox41 affected)

Details

(Reporter)

Description

4 years ago
This can be seen in very simplistic MSE page like:
http://people.mozilla.org/~cpearce/simple-dash/

or:
http://people.mozilla.org/~jyavenard/tests/mse_mp4/paper.html

These pages load data, but don't call mediasource.endOfStream().

As such, we don't hit EOS/ended once reaching the end of the data, but "stalled" instead.

The MediaDecoderStateMachine will continuously attempt to decode the next audio/video frame (by calling Advance Frame) even though we have nothing to decode.

The MDSM has a mechanism to know when data has been added, it shouldn't unecessarily retries forever to see if new data is available.

On my machine it causes nightly to reach 115% CPU usage.
(Reporter)

Comment 1

4 years ago
In the log you can see hundreds of mediapromise being created / resolved and the MDSM scheduling a new run several times per second.
(Reporter)

Comment 2

4 years ago
On Aurora, the effect is most surprising.

the video never finish playing. 
http://people.mozilla.org/~jyavenard/tests/mse_mp4/bipbop.html
Flags: needinfo?(cpearce)
I would have thought that the Request{Audio,Video}Data() promise would not be resolved until we have a sample? Or is it resolved with "waiting for data", and we try again?
Flags: needinfo?(cpearce)
(Reporter)

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.