Allow eviction of entire decoders that are ahead of the current play position

RESOLVED FIXED in Firefox 36

Status

()

Core
Audio/Video
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

(Blocks: 1 bug)

29 Branch
mozilla37
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox36 fixed, firefox37 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

3 years ago
Currently we only allow eviction of data that is behind the current play position.

It's possible to accumulate considerable amounts of data ahead of the current position (usually by seeking backwards in small increments), which won't be evicted by the current code.

Seeking backwards will results in new decoders for each seek, so we can evict entire decoders and prevent this from using excessive amounts of memory.
(Assignee)

Comment 1

3 years ago
Created attachment 8533510 [details] [diff] [review]
Part 1: Attempt to evict data from decoders in start-time order

We prefer to evict data as far away from the current playback position as possible, and this will help with that (in some cases).
Attachment #8533510 - Flags: review?(ajones)
(Assignee)

Comment 2

3 years ago
Created attachment 8533511 [details] [diff] [review]
Part 2: Allow eviction of decoders that are ahead of the current playback position
(Assignee)

Updated

3 years ago
Attachment #8533511 - Flags: review?(ajones)
Comment on attachment 8533510 [details] [diff] [review]
Part 1: Attempt to evict data from decoders in start-time order

Review of attachment 8533510 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/mediasource/TrackBuffer.cpp
@@ +239,5 @@
> +        decoders[i] != mCurrentDecoder) {
> +      RemoveDecoder(decoders[i]);
> +    }
> +    if (toEvict <= 0 ||
> +        decoders[i] == mCurrentDecoder) {

nit: line break
Attachment #8533510 - Flags: review?(ajones) → review+
Attachment #8533511 - Flags: review?(ajones) → review+
(Assignee)

Comment 4

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c24dfe0cf87
https://hg.mozilla.org/integration/mozilla-inbound/rev/e278ad9face8
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/b2f813477747 for mochitest-2 bustage:

https://treeherder.mozilla.org/ui/logviewer.html#?job_id=4520195&repo=mozilla-inbound
Flags: needinfo?(matt.woodrow)
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f9b7c71ba3d
(Assignee)

Comment 7

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/99d8d92a319b
https://hg.mozilla.org/mozilla-central/rev/0f9b7c71ba3d
https://hg.mozilla.org/mozilla-central/rev/99d8d92a319b
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
(Assignee)

Updated

3 years ago
Flags: needinfo?(matt.woodrow)
Comment on attachment 8533511 [details] [diff] [review]
Part 2: Allow eviction of decoders that are ahead of the current playback position

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Less consistent testing, sites more likely to serve Flash video.
[Describe test coverage new/current, TBPL]: Landed on m-c.
[Risks and why]: Low, MSE-specific code.
[String/UUID change made/needed]: None.
Attachment #8533511 - Flags: approval-mozilla-aurora?
Comment on attachment 8533510 [details] [diff] [review]
Part 1: Attempt to evict data from decoders in start-time order

Same request applies to all patches on this bug.
Attachment #8533510 - Flags: approval-mozilla-aurora?
status-firefox36: --- → affected
status-firefox37: --- → fixed
Attachment #8533510 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8533511 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/72f6dba74653
https://hg.mozilla.org/releases/mozilla-aurora/rev/d64cfe41fa74
status-firefox36: affected → fixed
You need to log in before you can comment on or make changes to this bug.