Closed Bug 1171778 Opened 10 years ago Closed 9 years ago

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

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox41 --- affected

People

(Reporter: jya, Unassigned)

References

(Blocks 1 open bug)

Details

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.
In the log you can see hundreds of mediapromise being created / resolved and the MDSM scheduling a new run several times per second.
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)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.