Closed Bug 1238343 Opened 4 years ago Closed 4 years ago

Update MDSM::mIsAudioPrerolling/mIsVideoPrerolling when playback rate changes

Categories

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

defect

Tracking

()

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

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

Since prerolling depends on the playback rate, we need to update mIsAudioPrerolling and mIsVideoPrerolling when the playback rate changes to avoid endless prerolling that prevents playback from starting.
Here is a scenario where prerolling never stops when the playback rate changes:
1. set 'preload' to 'metadata' in the script.
2. only the 1st frame is decoded for mMinimizePreroll is true.
3. let's say the duration of the 1st frame is 550ms.
4. call |v.playbackRate = 0.5; v.play();| in the 'loadedmetadata' handler.
5. HaveEnoughDecodedAudio(mAmpleAudioThresholdUsecs * mPlaybackRate)
   = HaveEnoughDecodedAudio(1000000 * 0.5) < the duration of the 1st frame = 550000us.
   MDSM consider it has ample frames in the queue and stop decoding.
6. since MDSM only updates mIsAudioPrerolling/mIsVideoPrerolling when a sample is decoded, MDSM will not update the flags due to 5.
7. MDSM will not start playback since prerolling is not finished.
Assignee: nobody → jwwang
Comment on attachment 8706165 [details]
MozReview Request: Bug 1238343 - Update MDSM::mIsAudioPrerolling/mIsVideoPrerolling when playback rate changes. r=cpearce.

https://reviewboard.mozilla.org/r/30249/#review27069
Attachment #8706165 - Flags: review?(cpearce) → review+
Priority: -- → P2
Thanks!
https://hg.mozilla.org/mozilla-central/rev/27cf5c58d880
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Comment on attachment 8706165 [details]
MozReview Request: Bug 1238343 - Update MDSM::mIsAudioPrerolling/mIsVideoPrerolling when playback rate changes. r=cpearce.

Approval Request Comment
[Feature/regressing bug #]:none
[User impact if declined]:playback might get stuck forever if the user change playback rate before playback starts.
[Describe test coverage new/current, TreeHerder]:tested on TreeHerder
[Risks and why]: low since the change is simple.
[String/UUID change made/needed]:none
Attachment #8706165 - Flags: approval-mozilla-beta?
Attachment #8706165 - Flags: approval-mozilla-aurora?
Comment on attachment 8706165 [details]
MozReview Request: Bug 1238343 - Update MDSM::mIsAudioPrerolling/mIsVideoPrerolling when playback rate changes. r=cpearce.

Assuming that this issue also exists in Fx43 and we have not felt the need to do a dot release about it, I do not think this issue seems severe enough to uplift a fix in 44.0b9. We are tying to limit the code churn at this point and this one does not seem to meet the bar for uplift to Beta44.
Attachment #8706165 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Comment on attachment 8706165 [details]
MozReview Request: Bug 1238343 - Update MDSM::mIsAudioPrerolling/mIsVideoPrerolling when playback rate changes. r=cpearce.

Let's take in 45.
Attachment #8706165 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.