Closed Bug 1238347 Opened 8 years ago Closed 8 years ago

test_BufferingWait_mp4.html timed out due to a bug in MDSM prerolling

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox43 --- ?
firefox44 --- wontfix
firefox45 --- fixed
firefox46 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

Another prerolling bug in MDSM which results in test_BufferingWait_mp4.html timeout.

This can be easily reproduced on windows by changing the return value of AudioPrerollUsecs() (https://hg.mozilla.org/try/rev/0134e7d3c5cb).

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9578fb270b34
The cause of test_BufferingWait_mp4.html timeout is as follows:

1. MDSM goes to buffering mode since it plays to the end of bipbop2. (https://hg.mozilla.org/mozilla-central/file/c33f30666b37dbceffb9fbe5089a668db8893a85/dom/media/mediasource/test/test_BufferingWait_mp4.html#l40)
2. Since we change the amount of audio to preroll to 1s and bipbop3 is less than 1s, MDSM receives OnNotDecoded again for audio with aReason==WAITING_FOR_DATA.
3. MDSM switch from BUFFERING to DECODING after decoding some video frames from bipbop3.
4. In StartDecoding() we have
   mIsAudioPrerolling = !DonePrerollingAudio();
   which will be true since we have less than 1s in the audio queue.
5. MDSM will never start playback for mIsAudioPrerolling is true.
Assignee: nobody → jwwang
Blocks: 1237806
6. Since playback is not started, MDSM will never advance playback position to 2.36843 or greater and causes timeout.

https://hg.mozilla.org/mozilla-central/file/c33f30666b37dbceffb9fbe5089a668db8893a85/dom/media/mediasource/test/test_BufferingWait_mp4.html#l53
Blocks: 948267
No longer blocks: 1237806
Attachment #8706166 - Flags: review?(cpearce) → review+
Comment on attachment 8706166 [details]
MozReview Request: Bug 1238347 - stop prerolling when decoding starts if we are waiting for data. r=cpearce.

https://reviewboard.mozilla.org/r/30253/#review27067

Good catch.
Priority: -- → P2
Thanks!
https://hg.mozilla.org/mozilla-central/rev/8ea53ac4b264
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
JW: is your preroll fix something we should uplift to Aurora 45? Can this problem affect real world content?
Flags: needinfo?(jwwang)
Yes, the chance is very low in the real world though. I will uplift prerolling bugs to aurora and beta since the fixes are simple and at low risk.
Flags: needinfo?(jwwang)
Comment on attachment 8706166 [details]
MozReview Request: Bug 1238347 - stop prerolling when decoding starts if we are waiting for data. r=cpearce.

Approval Request Comment
[Feature/regressing bug #]:none
[User impact if declined]:MSE playback might get stuck in buffering forever
[Describe test coverage new/current, TreeHerder]:tested on TreeHerder
[Risks and why]: low since the change is simple
[String/UUID change made/needed]:none

Note: this bug might be landed after bug 1238343.
Attachment #8706166 - Flags: approval-mozilla-beta?
Attachment #8706166 - Flags: approval-mozilla-aurora?
Comment on attachment 8706166 [details]
MozReview Request: Bug 1238347 - stop prerolling when decoding starts if we are waiting for data. r=cpearce.

While this may be fixing a valid issue, I have not heard of many reports on Fx43 where playback gets stuck. This fix has had no time to stabilize on Nightly, Aurora and therefore risky to take in Beta44. Sorry!
Attachment #8706166 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Comment on attachment 8706166 [details]
MozReview Request: Bug 1238347 - stop prerolling when decoding starts if we are waiting for data. r=cpearce.

But still time to take it in 45.
Attachment #8706166 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: