Closed Bug 1258627 Opened 4 years ago Closed 4 years ago

Sometimes MediaDecoderStateMachine gets stuck in buffering state forever

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox46 --- fixed
firefox47 --- fixed
firefox48 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

https://hg.mozilla.org/mozilla-central/file/4037eb98974db1b1e0b5012c8a7f3a36428eaa11/dom/media/MediaDecoderStateMachine.cpp#l835

Consider the following situation when #l835 is reached:
1. We stop decoding audio for we have ample samples in the audio queue.
2. Video decoding reaches the end for OnNotDecoded() is invoked with |aType == MediaData::VIDEO_DATA|

We will not schedule next cycle because decoding is not complete and get stuck in buffering state forever.

We should always schedule next cycle even if decode is not complete so we have a chance to leave buffering state.
Btw, this bug is manifested by bug 1242783 which somewhat changes the amount of audio buffering and decode timing. We need also uplift the fix to 46.
Assignee: nobody → jwwang
Blocks: 1237806
Priority: -- → P2
Need to uplift to 46.
Flags: needinfo?(jwwang)
Comment on attachment 8733270 [details]
MozReview Request: Bug 1258627 - always schedule next cycle so MDSM has a chance to leave buffering state. r=cpearce.

https://reviewboard.mozilla.org/r/41711/#review38373

Feels like a hacky fix, but at least it's a fix.
Attachment #8733270 - Flags: review?(cpearce) → review+
Thanks!
https://hg.mozilla.org/mozilla-central/rev/3cab27bc9f80
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Comment on attachment 8733270 [details]
MozReview Request: Bug 1258627 - always schedule next cycle so MDSM has a chance to leave buffering state. r=cpearce.

Approval Request Comment
[Feature/regressing bug #]:unknown
[User impact if declined]:playback might get stuck forever when buffering
[Describe test coverage new/current, TreeHerder]:TreeHerder
[Risks and why]: very low for the change is very simple
[String/UUID change made/needed]:none
Flags: needinfo?(jwwang)
Attachment #8733270 - Flags: approval-mozilla-beta?
Attachment #8733270 - Flags: approval-mozilla-aurora?
Comment on attachment 8733270 [details]
MozReview Request: Bug 1258627 - always schedule next cycle so MDSM has a chance to leave buffering state. r=cpearce.

We don't want people's videos to be stuck, let's try uplift to beta 5.
Attachment #8733270 - Flags: approval-mozilla-beta?
Attachment #8733270 - Flags: approval-mozilla-beta+
Attachment #8733270 - Flags: approval-mozilla-aurora?
Attachment #8733270 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.